Okay, please do not tease the dummy (me)...but does the way a SQL statements criteria filters are ordered affect its performance? For instance if I have 100 client with a sales_tot > 10000 does this:
select * from tbl_sales
where client_code = "0100"
and sales_tot > 10000
--run fast than this:
select * from tbl_sales
where sales_tot > 10000
and client_code = "0100"
Just wondering if since I am limiting the number of possible qulaifying returns based via the specific client ID if the first statement is better than the second? I am sure this is simple learned on the first day type stuff, but I sort of woke up one day needing to know SQL without ever really having any real training.
select * from tbl_sales
where client_code = "0100"
and sales_tot > 10000
--run fast than this:
select * from tbl_sales
where sales_tot > 10000
and client_code = "0100"
Just wondering if since I am limiting the number of possible qulaifying returns based via the specific client ID if the first statement is better than the second? I am sure this is simple learned on the first day type stuff, but I sort of woke up one day needing to know SQL without ever really having any real training.