wecharyu commented on code in PR #4744: URL: https://github.com/apache/hive/pull/4744#discussion_r1421697093
########## 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: The join could hit index, for example in `PARTITIONS` table it could hit the `UNIQUEPARTITION (PART_NAME, TBL_ID) ` index so it would not affect the performance. -- 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