Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4569

Queries with UNION ALL perform disproportionally badly

    XMLWordPrintable

    Details

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              gdorman Gregory Dorman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.