Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AND Gate Filtering Sequence in MySQL

Status
Not open for further replies.

aalnaif

Technical User
Jan 12, 2007
44
CA
I was wondering about the filtering sequence that MySQL performs on AND gates. For example, consider the following query:

Code:
select *
from expl_table
where ColA > 30
and ColB < 15;

Does MySQL first select rows where ColA > 30, and then further filter the resultset for ColB < 15, or does it simply go through each row and select those rows that meet both criteria.

This is useful to know when indexing columns. Also, would anyone know of a good article or manual which explains this topic?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top