File: const_row_not_found.sql

package info (click to toggle)
percona-toolkit 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, trixie
  • size: 68,916 kB
  • sloc: perl: 241,287; sql: 22,868; sh: 19,746; javascript: 6,799; makefile: 353; awk: 38; python: 30; sed: 1
file content (11 lines) | stat: -rw-r--r-- 1,267 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
mysql> CREATE TABLE t1 (i INT);
mysql> explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12));
+----+--------------+------------+--------+---------------+------+---------+------+------+--------------------------------+
| id | select_type  | table      | type   | possible_keys | key  | key_len | ref  | rows | Extra                          |
+----+--------------+------------+--------+---------------+------+---------+------+------+--------------------------------+
|  1 | PRIMARY      | t1         | system | NULL          | NULL | NULL    | NULL |    0 | const row not found            | 
|  2 | SUBQUERY     | NULL       | NULL   | NULL          | NULL | NULL    | NULL | NULL | No tables used                 | 
|  3 | SUBQUERY     | NULL       | NULL   | NULL          | NULL | NULL    | NULL | NULL | no matching row in const table | 
|  4 | UNION        | t12        | system | NULL          | NULL | NULL    | NULL |    0 | const row not found            | 
| NULL | UNION RESULT | <union2,4> | ALL    | NULL          | NULL | NULL    | NULL | NULL |                                | 
+----+--------------+------------+--------+---------------+------+---------+------+------+--------------------------------+