The question of whether the index can be used in mysql database

problems with mysql database indexes
see if indexes can be used

key index (parttime)
key index1 (parttime1,partime)

key index2 (parttime2+parttime3)

1.select id from A3 where parttime > "2018-08-03"

2.select id from A3 where partime2 > "2018-08-03" and parttime3 > "2018-09-23"

which index of 1 and 2 can be used?

Mar.13,2021

without guessing, run EXPLAIN , and you can see whether the index is useful or not.

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-1befaa0-31c9a.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-1befaa0-31c9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?