[MCOL-4563] Investigate and correct a CPU / elapsed anomaly with UNION Created: 2021-02-25 Updated: 2021-04-04 Resolved: 2021-04-04 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1 |
| Type: | Task | Priority: | Major |
| Reporter: | Gregory Dorman (Inactive) | Assignee: | Gregory Dorman (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Epic Link: | Columnstore - Technical debts in Optimizer / Rewriter | ||||||||
| Description |
|
This was tested in 3 node cluster, with and without shared folders. The problem is that UNION takes far more than the sum of its branches. This is reflect in both elapsed and CPU time consumed by ExeMgr. See consolidated summary in the attachement, as well as an easy reproduction below. {{
-------------
------------- MariaDB [bts]> select count(year) from (select * from flights where year >2018) q; -------------
-------------
------------- MariaDB [bts]> select count(year) from (select * from flights where year <2018 union all select * from flights where year>2018) q; -------------
-------------
------------- MariaDB [bts]>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |