|
本帖最后由 fuiou_cary 于 2014-8-26 11:38 编辑
digdeep126 发表于 2014-8-25 10:07 ![]()
把执行计划贴出来看看。
日期是主键的一个字段,这里是范围查询最后key就没有用,剩下的都是or字段的索引调用
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: T_08
type: index_merge
possible_keys: PRIMARY,i_fas_txn_log_a,i_fas_txn_log_b,i_fas_txn_log_c,i_fas_txn_log_d,i_fas_txn_log_e,i_fas_txn_log_f,i_fas_txn_log_g
key: i_fas_txn_log_e,i_fas_txn_log_f,i_fas_txn_log_c,i_fas_txn_log_d,i_fas_txn_log_g,i_fas_txn_log_b,i_fas_txn_log_a
key_len: 26,26,26,26,26,26,26
ref: NULL
rows: 21192
Extra: Using sort_union(i_fas_txn_log_e,i_fas_txn_log_f,i_fas_txn_log_c,i_fas_txn_log_d,i_fas_txn_log_g,i_fas_txn_log_b,i_fas_txn_log_a); Using where with pushed condition
1 row in set (0.01 sec)
|
|