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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c228-4132e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c228-4132e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?