Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
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
- links to