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

Mysql delete in vs =

Status
Not open for further replies.

jimbojames5645

Programmer
Joined
Dec 12, 2003
Messages
36
Location
US
Which is faster, delete from db.table where field = 'x' or delete from db.table where field in ('x')
 
My initial assumption is that '=' is faster than 'IN', simply due to the fact that with the 'IN' SQL has to potentially loop through each value, where with '=' it doesn't have that overhead of looping to deal with.

Take Care,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top