[MCOL-4569] Queries with UNION ALL perform disproportionally badly Created: 2021-03-02  Updated: 2022-09-12  Resolved: 2022-06-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: MDB Plugin
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Gregory Dorman (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: mcs_cs, performance

Issue Links:
Duplicate
duplicates MCOL-4901 Allow pushdown of queries involving U... Closed
is duplicated by MCOL-4563 Investigate and correct a CPU / elaps... Closed
Issue split
split from MCOL-4543 Locate and Remove CPU waste in PM1 on... Closed
Problem/Incident
is caused by MDEV-25080 Allow pushdown of queries involving U... Closed
Relates
relates to MCOL-4584 Significant performance degradation w... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MCOL-4589 Optimize out columns in a subquery in... Sub-Task Closed Daniel Lee  
Epic Link: ColumnStore Performance Improvements
Sprint: 2021-4

 Description   

It gets much worse if a UNION ALL is involved.
If you do
select count(c) from (select * from t1) q;
select count(c) from (select * from t2) q;
and compare it to
select count(c) from (select * from t1 union all select * from t2) q; the difference in elapsed and CPU is around 10x (second query is 10x worse than the sum of the first two).
Again, plans and I/O stats are identical (second is the same as sum of the first two).



 Comments   
Comment by alexey vorovich (Inactive) [ 2022-06-23 ]

duplicate to mcol-4901
allen.herrera

Generated at Thu Feb 08 02:51:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.