-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize SHOW TABLES #631
Comments
Does it actually do a call to HMS? Are you sure that results are not taken from cache? |
But if the cache is disabled it would fetch from the HMS right ? |
Transactional cache is always enabled. We do not query HMS twice for the same thing within the same transaction. |
@kokosing there are 2 different calls to HMS. |
Probably best fix would be to make information schema aware of selected columns. |
It takes forever when I do "SHOW TABLES" for ~6k tables. Any update on the issue? |
When using
SHOW TABLES
against Hive connector, the Metastore is queries twice.This is because
io.prestosql.sql.rewrite.ShowQueriesRewrite.Visitor#visitShowTables
delegatesSHOW TABLES
toinformation_schema.tables
information_schema.tables
differentiates between tables and views, so we query Metastore twice in https://github.com/prestosql/presto/blob/8f949a79585387614d428fe2a3d0ab84b781ab12/presto-main/src/main/java/io/prestosql/connector/informationschema/InformationSchemaPageSourceProvider.java#L182-L183Since
SHOW TABLES
does not differentiate between tables and views, we could do this faster.The text was updated successfully, but these errors were encountered: