>> But EXPLAIN is only a prediction. If you look at the changes in the >> Handler status variables, you'll see the second one reads fewer rows. >> >> > > Ok, I think I get it. I first changed both of my queries to add > "sql_no_cache" because without that, the Handler_read_rnd_next variable was > zero in both cases. > > Before running each query, I ran "flush status", then the query, then "show > session status like 'Handler%'". The first one had a value of 207 for > "Handler_read_rnd_next" and the second one had a value of 1.
Yes, that's it exactly. The LIMIT stops the work as soon as you find the first row. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org