Re: slow performance with large "or" list in where

2003-10-05 Thread colbey
Might instead want to look at where fooid in (xx, xx, xx, xx) On Sat, 4 Oct 2003, Marc Slemko wrote: > If I do a query such as: > > SELECT * from foo where fooid = 10 or fooid = 20 or fooid = 03 ... > > with a total of around 1900 "or fooid =" parts on a given table with 500k > rows, it takes

Re: slow performance with large "or" list in where

2003-10-05 Thread Matt W
Hi, - Original Message - From: "Marc Slemko" Sent: Sunday, October 05, 2003 2:27 PM Subject: Re: slow performance with large "or" list in where > On Sun, 5 Oct 2003, Santino wrote: > > > Have You test in operator? > > > > select * from table w

Re: slow performance with large "or" list in where

2003-10-05 Thread Marc Slemko
On Sun, 5 Oct 2003, Santino wrote: > Have You test in operator? > > select * from table where id in (10,20,30,50,60,90, ) Yes, IN does perform at the levels I want and works for the simplified example I gave, but doesn't work for the generalized case I need, which is matching individual rows

Re: slow performance with large "or" list in where

2003-10-05 Thread Santino
Have You test in operator? select * from table where id in (10,20,30,50,60,90, ) Santino -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: slow performance with large "or" list in where

2003-10-05 Thread Marc Slemko
On Sun, 5 Oct 2003, Alexis da Cruz Henriques Guia wrote: > > Your problem is that MySQL don't use indeces in selects with 'or' (See MySQL > manual). If you are referring to: http://www.mysql.com/doc/en/Searching_on_two_keys.html then that page doesn't say mysql doesn't use indexes on se

Re: slow performance with large "or" list in where

2003-10-05 Thread Alexis da Cruz Henriques Guia
Your problem is that MySQL don't use indeces in selects with 'or' (See MySQL manual). But i didn't have understand what's your problem executing individual selects... You don't need to open parallel connections. Put the UPDATE commands in a file, and execute them in mysql prompt like this: mysql>

slow performance with large "or" list in where

2003-10-04 Thread Marc Slemko
If I do a query such as: SELECT * from foo where fooid = 10 or fooid = 20 or fooid = 03 ... with a total of around 1900 "or fooid =" parts on a given table with 500k rows, it takes about four times longer than doing 1900 separate queries in the form: SELECT * from foo where fooid = 10 fooid is