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

create non columnstore table from columnstore select with joins is slow

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 1.1.1
    • Icebox
    • MariaDB Server
    • None

    Description

      Generate a large date file and load this to a table loans_table:

      mcmsysql test
       
      create table loan_test (
      loanid varchar(40),
      PRODUCTTYPE varchar(120),
      Center varchar(120)
      ) engine=columnstore;
      exit;
       
      for i in $(seq 0 8981822); do echo "loanid_$i|PRODUCTTYPE_$i|Center"; done > loan_test.tbl
      cpimport test loan_test loan_test.tbl
      

      The following create table will be very slow (hours):

      create table tempdata_error as select distinct a.center from loan_test a inner join loan_test b on (a.loanid = b.loanid);
      

      Change this to insert select and it will be fast:

      create table tempdata_error(Center varchar(120)) engine=MyISAM;
      insert into tempdata_error select distinct a.center from loan_test a inner join loan_test b on (a.loanid = b.loanid);
      

      I believe what is happening is that the create table is getting executed as effectively vtable mode 0 so the joins are done as nested loop joins assuming indexes which is very slow. The insert into select is correctly pushed down to columnstore and so executes at a more appropriate speed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dthompson David Thompson (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 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.