Joshua,

Joshua Spoerri wrote:
Forgive me, that example is no good.

Oddly, it works, but the following does not:
mysql> create temporary table x (y int, z int, q int, index (y, z)); insert into x 
values (1,2,3), (3,4,5), (5,6,7); explain select * from x where y = 1 or z = 1;

MySQL will never use any index for small tables. With just few rows using index adds overhead only. Table scan is faster in such cases. This is docummented behaviour.


Best regards

--
 Are you MySQL certified? -> http://www.mysql.com/certification
 For technical support contracts, visit https://order.mysql.com/?ref=msal
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /    Mr. Alexander Keremidarski <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
 /_/  /_/\_, /___/\___\_\___/   Sofia, Bulgaria
         <___/  www.mysql.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