The book I'm going through has given a rather poor explanation of why exactlt to place the most restrictive condition last in the
Say that we have Query 1:
WHERE LAST_NAME = 'SMITH'
AND CITY = 'INDIANAPOLIS';
And Query 2:
WHERE CITY = 'INDIANAPOLIS'
AND LAST_NAME = 'SMITH';
and the first query takes 20 seconds, while the 2nd query only takes 10. The book goes on to say that "Because the 2nd query returned faster results and the most restrictive condition was listed last in the WHERE clause, it is safe to assume that the optimizer reads the WHERE clause from the bottom up.
I'm confused as to how I'm supposed to make that inference. Is it that filtering after 1 condition is much slower than the first filter?