wecharyu commented on code in PR #4744: URL: https://github.com/apache/hive/pull/4744#discussion_r1421910658
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/impl/FindColumnsWithStatsHandler.java: ########## @@ -37,11 +37,16 @@ public class FindColumnsWithStatsHandler implements QueryHandler<List<String>> { //language=SQL private static final String TABLE_SELECT = "SELECT \"COLUMN_NAME\" FROM \"TAB_COL_STATS\" " + - "WHERE \"DB_NAME\" = :dbName AND \"TABLE_NAME\" = :tableName"; + "INNER JOIN \"TBLS\" ON \"TAB_COL_STATS\".\"TBL_ID\" = \"TBLS\".\"TBL_ID\" " + Review Comment: `UNIQUEPARTITION ` index is high performance, we have a table with 4 millions partitions, and the API`getPartitionByName` hitting the `UNIQUEPARTITION` index only takes around 200 milliseconds. Also let me add a benchmark test for this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org