Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
SaTriGuy — — source: Informix-list mailing list archive (1991-1998)
>What are the order of operations enforced by the Informix SQL
>parser with regards to AND/OR in a WHERE clause
It depends on if the order makes any logical difference. For instance, the
optimizer treats the "and" clauses as equal and will execute them depending on
which will produce the earliest greatest selectivity. That is if the query
were:
WHERE a > 50 and b = 60
And there is an index on both columns a and columns 6....
If the optimizer determines that by selecting against' b' will probably result
in 10 rows while selecting against 'a' results in 50000 rows, then the query
plan will select agains column b first. If however, the optimizer is able to
determine that the vast majority of the tuples have 'a' less than 50 and the
index on column 'b' has a large number of duplicates, then the select will
query against column 'a' first. This decision is based on information
gathered when "update statistics" is run.
Madison Pruet
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.