Suppose I want to query a table based on multiple WHERE clauses.
Would either of these statements be faster than the other?
SELECT *
FROM table
WHERE (line_type='section_intro' OR line_type='question')
AND (line_order BETWEEN 0 AND 12)
ORDER BY line_order";
...or:
SELECT *
FROM table
WHERE (line_order BETWEEN 0 AND 12)
AND (line_type='section_intro' OR line_type='question')
ORDER BY line_order;
I guess what it would come down to is whether the first one would select more than 12 records, and then pare down from there.