Be more aggressive in optimizing constant conditional expressions.
Avoid unnecessary affinity transformations when building indices using
data from a table.
Try to factor constant subcomponents of the WHERE clause out of the loop.