MySQL optimization of the index table Case

Built table SQL:
Here Insert Picture Description
Query category_id is 1 and a case where comments greater than 1, views the most article_id, first explain Results:
Here Insert Picture Description
Here Insert Picture Description
Construction three field index results:
Here Insert Picture Description
Here Insert Picture Description
Since the second index range is not precisely positioned if necessary to modify the index
Here Insert Picture Description
built two field index results:
Here Insert Picture Description

Published 217 original articles · won 125 Like · views 10000 +

Guess you like

Origin blog.csdn.net/qq_39885372/article/details/104183618