Baymine opened a new issue, #66079: URL: https://github.com/apache/doris/issues/66079
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris/issues) and found no similar issues. ### Description `SHOW TABLES` against an external catalog iterates `DatabaseIf.getTables()`. For external databases this eagerly initializes every table through the meta cache — one `getTableNullable()` call, and therefore one remote metadata load, per table. For a catalog/database with many tables this turns a cheap name listing into N remote loads, making `SHOW TABLES` slow. The verbose form `SHOW FULL TABLES` genuinely needs per-table information (`Table_type`, storage-format columns), but a plain `SHOW TABLES` only needs table names, which the catalog can already provide via `getTableNamesOrEmptyWithLock()` without loading any table object. ### Solution For the common case — a non-verbose `SHOW TABLES` on an external catalog — list the names directly via `getTableNamesOrEmptyWithLock()` instead of `getTables()`, so no table is initialized. The per-table `SHOW` privilege filter is preserved (it is name-based and needs no table load), so no table name is exposed to a user who lacks `SHOW` privilege on it. `SHOW FULL TABLES` (verbose), `SHOW VIEWS`, `SHOW STREAMS`, and internal-catalog `SHOW TABLES` keep the existing `getTables()` path and are unaffected. ### Use case Faster `SHOW TABLES` on external (e.g. Hive/Iceberg) catalogs with many tables. ### Related issues _No response_ ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
