Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
MDEV-26278 only considers derived tables having GROUP BY expressions. But if a derived table has SELECT DISTINCT this can also be considered as if table has a unique key on selected fields, and so can be a subject to elimination:
select t1.* from t1 left join (select distinct a from t2) D on D.a=t1.a; |
Also MDEV-26278 does not implement elimination for derived tables with UNION, though it seems possible:
select t1.* from t1 left join |
(select distinct a from t2 |
union |
select distinct a from t3) D |
on D.a=t1.a; |
Attachments
Issue Links
- relates to
-
MDEV-26278 Table elimination does not work across derived tables
- Closed