Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24911

Metastore: Create index on SDS.CD_ID for Postgres

    XMLWordPrintableJSON

Details

    Description

      While investigating HIVE-24870, we found that during a long incremental replication, an SDS.CD_ID can improve the performance.
      It was tested by postgres like below:

      CREATE INDEX IF NOT EXISTS "SDS_N50" ON "SDS" USING btree ("CD_ID");
      EXPLAIN (ANALYZE,BUFFERS,TIMING) select count(*) from "SDS" where "CD_ID"=THE_MOST_FREQUENTLY_USED_CD_ID_HERE;
      DROP INDEX IF EXISTS "SDS_N50";
      EXPLAIN (ANALYZE,BUFFERS,TIMING) select count(*) from "SDS" where "CD_ID"=THE_MOST_FREQUENTLY_USED_CD_ID_HERE;
      

      Further results can be found in: command-output.txt

      After some investigation, I found that this index is also part of the schemas for a very long time:
      orcale: HIVE-2928
      mysql: HIVE-2246
      mssql: HIVE-6862 (or earlier)

      ...except Postgres.

      Attachments

        1. command-output.txt
          3 kB
          László Bodor

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m