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

Increase the performance of getTableColumnStatistics and getPartitionColumnStatistics

    XMLWordPrintableJSON

Details

    Description

      When the PART_COL_STATS table contains high number of rows the getTableColumnStatistics and getPartitionColumnStatistics response time increases.

      The root cause is the full table scan for the jdbc query below:

      2021-09-27 13:22:44,218 DEBUG DataNucleus.Datastore.Native: [pool-6-thread-199]: SELECT DISTINCT "A0"."ENGINE" FROM "PART_COL_STATS" "A0"
      2021-09-27 13:22:50,569 DEBUG DataNucleus.Datastore.Retrieve: [pool-6-thread-199]: Execution Time = 6351 ms 

      The time spent in here:

            query = pm.newQuery(MPartitionColumnStatistics.class);
            query.setResult("DISTINCT engine");
            Collection names = (Collection) query.execute();
      

      We might get a better performance if we limit the query range based on the cat/db/table.

      Attachments

        Issue Links

          Activity

            People

              pvary Peter Vary
              pvary Peter Vary
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 0.5h
                  0.5h