Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
11.7.2
-
None
-
docker
Description
The following two queries will always return an empty result. However, the second query wastes execution time. If there are a large number of queries connected through the INTERSECT keyword, the wasted computing time will be very large.
MariaDB > USE information_schema;
MariaDB [information_schema]> SELECT * from TABLES CROSS JOIN VIEWS ON TABLES.TABLE_NAME != VIEWS.TABLE_NAME LIMIT 0;
Empty set (0.001 sec)
MariaDB [information_schema]> SELECT * from TABLES CROSS JOIN VIEWS ON TABLES.TABLE_NAME != VIEWS.TABLE_NAME INTERSECT SELECT * from TABLES CROSS JOIN VIEWS ON TABLES.TABLE_NAME NOT LIKE VIEWS.TABLE_NAME LIMIT 0;
Empty set (5.483 sec)
Attachments
Issue Links
- relates to
-
MDEV-36654 INTERSECT with a empty set/impossible where should eliminate both from the query plan
-
- Confirmed
-