v.23.11New Feature

Added async_load_databases Setting for Faster Database Loading

Added server setting async_load_databases for asynchronous loading of databases and tables. Speeds up the server start time. Applies to databases with Ordinary, Atomic and Replicated engines. Their tables load metadata asynchronously. Query to a table increases the priority of the load job and waits for it to be done. Added a new table system.asynchronous_loader for introspection. #49351 (Sergei Trifonov).
Added async_load_databases server setting for asynchronous loading of databases and tables, improving server startup time. Metadata for tables in Ordinary, Atomic, and Replicated databases loads asynchronously, with query access prioritizing and waiting for load completion. Introduced system.asynchronous_loader table for monitoring.

Why it matters

This feature aims to reduce ClickHouse server startup time by loading database and table metadata asynchronously rather than synchronously blocking startup. It improves overall server responsiveness and efficiency, especially on large deployments. It also provides insight into loading status via the new introspection table.

How to use it

Enable the feature by setting async_load_databases = 1 in the server configuration or via a SET query. Once enabled, tables from supported engines (Ordinary, Atomic, Replicated) will load metadata asynchronously. Run queries on a table to prioritize its load and wait if loading is in progress. Use the system.asynchronous_loader table to check the status of asynchronous loading jobs.