[ https://issues.apache.org/jira/browse/DRILL-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15227149#comment-15227149 ]
ASF GitHub Bot commented on DRILL-4577: --------------------------------------- Github user jinfengni commented on a diff in the pull request: https://github.com/apache/drill/pull/461#discussion_r58616431 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java --- @@ -194,4 +195,26 @@ public void dropTable(String tableName) { .message("Dropping tables is not supported in schema [%s]", getSchemaPath()) .build(logger); } -} + + /** + * Visit the tables in this schema and write to recordGenerator + * @param recordGenerator recordGenerator for the output + * @param schemaPath the path to the given schema + */ --- End diff -- Why do you add this API to AbstractSchema? We should not put the logic of RecordGenerator in Schema. A cleaner way is to add getTablesByNames() in AbstractSchema, and leave the logic of iterating and record generating to RecordGenerator. If the underlying storage supports bulk load ( like Hive does), then use the bulk load. Otherwise, just call getTable() individually for getTablesByNames(). > Improve performance for query on INFORMATION_SCHEMA when HIVE is plugged in > --------------------------------------------------------------------------- > > Key: DRILL-4577 > URL: https://issues.apache.org/jira/browse/DRILL-4577 > Project: Apache Drill > Issue Type: Improvement > Components: Storage - Hive > Reporter: Sean Hsuan-Yi Chu > Assignee: Sean Hsuan-Yi Chu > Fix For: 1.7.0 > > > A query such as > {code} > select * from INFORMATION_SCHEMA.`TABLES` > {code} > is converted as calls to fetch all tables from storage plugins. > When users have Hive, the calls to hive metadata storage would be: > 1) get_table > 2) get_partitions > However, the information regarding partitions is not used in this type of > queries. Beside, a more efficient way is to fetch tables is to use > get_multi_table call. -- This message was sent by Atlassian JIRA (v6.3.4#6332)