Robert DiFalco wrote:
In a previous database engine I was using an IN was more optimal than a
<>. So, for example:
SELECT * FROM table WHERE table.type IN (1,2,3); Where the possible values of type are 0-3, was appreciably faster than: SELECT * FROM table WHERE table.type <> 0;
IN should be faster implemented with both hash tables and BTREE's so nowadays it should also be faster than <> as all MySQL implementation AFAIK use those well known data structures for indexes.


I've been playing with the Query Browser and checking out the
optimization documents and haven't been able to make a clear call on
whether or not this is also the case with MySQL/InnoDB.
TIA, R.


--
Mladen Adamovic
http://home.blic.net/adamm
http://www.shortopedia.com http://www.froola.com


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

Reply via email to