Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Ian P. Christian (pookeypookey.co.uk)
Date: Sun Mar 29 2009 - 04:13:10 CDT
2009/3/29 Oscar <ro4tubgmail.com>:
> Hi all-
> I want to know what the difference between IN and OR is under the hood.
> select * from dummy_table where id in (2, 3, 4, 5, 6, 7);
> select * from dummy_table where id=2 or id=3 or id=4 or id=5 or id=6 or
I've have thought once the query is compiled, they are the same. What
might cause a difference in performance is doing id > 2 and id <= 7.
Test it on a large dataset and let us know :)
Follow me on twitter: http://twitter.com/ipchristian
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql