macbre/index-digest

Do not report "Impossible WHERE" queries as ones not using an index

macbre opened this issue · 0 comments

SELECT foo FROM 0019_queries_not_using_indices WHERE 1 = 0;

--

mysql@localhost[index_digest]>explain SELECT foo FROM 0019_queries_not_using_indices WHERE 1 = 0;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
| id | select_type | table | partitions | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra            |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
|  1 | SIMPLE      | NULL  | NULL       | NULL | NULL          | NULL | NULL    | NULL | NULL |     NULL | Impossible WHERE |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
1 row in set, 1 warning (0,00 sec)
{
 "explain_filtered": null, 
 "explain_rows": null, 
 "explain_possible_keys": null, 
 "explain_extra": "Impossible WHERE", 
 "query": "/* 70211dca */ select curation_cms.topics.id from curation_cms.topics where 1 = 0"
}

See #44 for a similar issue, but with a value that is not present in the table.

File Impossible WHERE as a new report type.