where clause

FireStrike

Registered User.
Local time
Today, 15:17
Joined
Jul 14, 2006
Messages
69
I have an select statment that pulls data from a server. This server is really slow, and there is quite a bit of data. This statement has the following where clause.

"WHERE upc_number = '" & strPikWhere & "' AND ((dbo_root_description_type.description_name)='PFMS' Or " & _

"(dbo_root_description_type.description_name)='Fulltech') AND ((dbo_root_price.zone) Not Like '8*') " & _

I was wondering if the order of these where statements would make a difference, and if so how?
 
Well, it'd make more sense if you order your criteria according to what will exlcude the most first to what will exclude the least last. In other words, you want first criteria to filter the most data out, making the next criteria run faster as there is less data to filter out.
 

Users who are viewing this thread

Back
Top Bottom