v.20.4Improvement

Add total_rows and total_bytes to system.tables table

Add total_rows/total_bytes into the system.tables table. #9919 (Azat Khuzhin)
Added total_rows and total_bytes columns to the system.tables table in ClickHouse.

Why it matters

To provide users with direct access to the total number of rows and the total data size in bytes for each table through the system.tables table, improving monitoring and table metadata insight.

How to use it

Query the system.tables table and include total_rows and total_bytes columns in your SELECT statement, for example:

SELECT name, total_rows, total_bytes
FROM system.tables
WHERE database = 'your_database'

No additional configuration is required to enable these columns.