skip to Main Content

Mysql – Order by with and without Limit clause uses different index

Can someone explain why the optimizer chooses different indexes if Limit is used? MariaDB > EXPLAIN SELECT dms_meta.docid FROM dms_meta WHERE (dms_meta.metid = 3 and dms_meta.value = '2015-10-01') ORDER BY dms_meta.docid ASC limit 25; +------+-------------+----------+-------+---------------+------------+---------+------+------+-------------+ | id | select_type |…

VIEW QUESTION
Back To Top
Search