This is trivial to benchmark yourself.  Try:

BENCHMARK(100000, SELECT yada, yada FROM test WHERE id IN(1,2,3))

And compare to

BENCHMARK(100000, SELECT yada,yda FROM test WHERE (id =1 or id = 2 or id
=3))

See http://www.mysql.com/doc/en/Miscellaneous_functions.html for
documentation on the BENCHMARK command.

--Michael

> -----Original Message-----
> From: Tom O'Neill (MySQL User) [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 20, 2003 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: SELECT SPEEDS...... 
> 
> 
> Is there any difference in speed between the following select 
> statements?
> 
> SELECT yada,yda FROM test WHERE id IN(1,2,3) 
> 
> OR
> 
> SELECT yada,yda FROM test WHERE (id =1 or id = 2 or id =3) 
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to