当查询为:
explain select mail from client_login_logs where create_time>='2017-10-11' and create_time<='2017-10-21' and device_type=5 and mail!=''
结果为:
当查询的日期增加一天,如下:
explain select mail from client_login_logs where create_time>='2017-10-11' and create_time<='2017-10-22' and device_type=5 and mail!=''
结果为
idx_cdate_dtype_staus 这个索引列存在空值。
建议加上cdate_dtype_staus!=null