如下图为多索引,有联合索引
timestamp 和 txid 做为单个关键字段查询有效。
timestamp 和 txid 联合查询时,则联合索引 txid, timestamp, input_total 有效。
联合索引居左有效
举例 txid, timestamp, input_total
当查询(txid, timestamp, input_total)、(txid, timestamp)、(txid)时该联合索引有效。
当查询(timestamp, input_total)、(txid, input_total)、(timestamp)、(input_total)时该联合索引无效。
原文:https://www.cnblogs.com/wf-l5201314/p/11541694.html