The difference is based on the relative frequency of queries where a is
important vs. where b is important. Either way, what will happen is that the
index scan will isolate the first item mentioned, then scan the result set
to isolate the second term.

e.g.

SELECT * FROM someTable WERE a = someValue and b = someOtherValue

Step one isolates the matching "a" values.
Step two walks through that resultset and examines each value of b.

Since the values of b are already in memory, all it has to do is examine the
index keys to find the matches of b. No additional disk read is required.

Arthur

Reply via email to