How to force mysql UPDATE query to use index? How to enable mysql engine to automatically use the index instead of forcing it?
问题 Below is the update query/query plan that is not using the compound index that was created recently. The explain shows that its not using the compound index named radacctupdate which i think will make the update query faster. There are other indexes on table too which are used by other queries. EXPLAIN UPDATE radacct SET acctstoptime = '2017-01-08 11:52:24', acctsessiontime = unix_timestamp('2017-01-08 11:52:24') - unix_timestamp(acctstarttime), acctterminatecause = '', acctstopdelay =