How to make Sqlite use an index for ordering on multiple columns in the case of multiple selection from the same table?

若如初见. 提交于 2019-12-01 14:43:09

An index can be used to speed up sorting only if the query allows to return the rows in the order in which they are stored in the index.

This is not possible when another column with a different index is used to look rows up, or when you are returning multiple rows because of a cross join.

Try adding an index on lemId, but this is unlikely to help with the sorting.

The sorting is slow because there are too many result before the LIMIT.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!