MYSQL index

sql WHERE service_time BETWEEN 1527782400 AND 1530460799 how to add an index does not work

Php
Mar.21,2021

what about the complete sql?


any index is the same, you need to make sure that your range of values is not too large, otherwise mysql will still scan the whole table even if you set up the index. If you want higher indexing efficiency, it would be better to create an appropriate composite index according to the actual situation. Reduce the number of possible values to avoid full table queries.

Menu