mySQL command Explain ignore LIMIT? -
i use mysql server version 5.5.14 , trying simple sql query explain command:
explain select id, name, thumb `twitter_profiles` limit 10;
and shows me result:
+----+-------------+-------+------+---------------+------+---------+------+-------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | | +----+-------------+-------+------+---------------+------+---------+------+-------+-------+ | 1 | simple | tp | | null | null | null | null | 40823 | | +----+-------------+-------+------+---------------+------+---------+------+-------+-------+ 1 row in set (0.02 sec)
my question why scans whole table instead of taking first 10 rows specified in limit clause?
thank advice in advance!
cheers,
jakub
here link of article mysql explain limits , errors
limit not taken account while estimating number of rows if have limit restricts how many rows examined mysql still print full number
Comments
Post a Comment