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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where-clause terms in order? 1

Status
Not open for further replies.

graabein

Programmer
Oct 9, 2002
186
NO
Hi,

I have a rather large table with indexing on the department ID. Some places I just use the employee ID to lookup records. Should I change these to Where dept_id=4 and emp_id=15329 instead of just Where emp_id?

Will it run more effective?

[elephant2]
graabein
 
Because emp_id is the primary key. I suppose any table is indexed on the primary key but if dept_id reduces the bulk of records for the key-lookup... is there a Yes/No answer for this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top