Viewing system tables

The following system tables are available for viewing by the administrator:

  • system.query_log — history of user queries (query text, status, execution time, execution duration, etc.)

  • system.users — user information (name, current working pool, authorization type, etc.)

  • system.worker_pools — working pool information (name, size, maximum number of workers, scaling strategy, etc.)

Usage example

Let’s display all queries made by user tengri_user between December 21 and 23, 2025, with their timestamp, duration, and status:

SELECT
    query,
    duration_ms,
    started_at
FROM system.query_log
WHERE username = 'tengri_user'
  AND started_at BETWEEN '2025-12-21' AND '2025-12-23'
+-------------------+-------------+----------------------------+---------+
| query             | duration_ms | started_at                 | status  |
+-------------------+-------------+----------------------------+---------+
| select * from ... | 490         | 2025-12-22 13:27:21.349305 | success |
+-------------------+-------------+----------------------------+---------+
| ...               | ...         | ...                        | ...     |
+-------------------+-------------+----------------------------+---------+