You need to enable JavaScript to run this app.
ByteHouse Cloud Data Warehouse Version

ByteHouse Cloud Data Warehouse Version

Copy page
Download PDF
System tables
system.cnch_binlogs
Copy page
Download PDF
system.cnch_binlogs

The system table system.cnch_binlogs shows the details of each Binlog part for a given table. Before reading a Binlog part, you can use this system table to query details and customize the reading method accordingly. To query only the max and min BSN of a table, it is recommended to query system.cnch_table_info, which is faster and has lower overhead. When querying this system table, you must use equality filters for both database and table.

Usage limitations

This system table can be viewed when the ByteHouse CDW engine version is v2.3 or above. You can log in to the ByteHouse CDW Console, click the Tenant Management tab at the top, and view the engine version in Basic info.

Column names

| | | | \

NameData typeField meaning description
\
databaseStringThe database name to query.
\
tableStringThe table name to query.
\
part_nameStringThe name of the current Binlog part.
\
bsnUInt64The BSN of the current Binlog part.
\
rowsUInt64The number of rows in the current Binlog part.
\
bytesUInt64The number of storage bytes for the current Binlog part.
\
txn_idUInt64The transaction ID that generated the current Binlog part.
\
commit_timeDateTimeThe commit time of the transaction that generated the current Binlog part.
\
published_timeDateTimeThe time when the current Binlog part was published.
\
activeUInt8Whether the current Binlog part is active (within TTL and published).
\
is_stagedUInt8Whether the current Binlog part is published.
\
shard_statsStringThe number of records for each Shard in the current Binlog part.

Example

To query all Binlog part information of the table db_test.binlog_test:

SELECT 
    database, 
    table, 
    bsn, 
    rows, 
    bytes, 
    active, 
    shard_stats 
FROM system.cnch_binlogs 
WHERE (database = 'db_test') AND (table = 'binlog_test')

Query results examples are as follows:

┌─database─┬─table───┬─bsn─┬─rows─┬─bytes─┬─active─┬─shard_stats────┐ 
│ db_test   │ binlog_test │   1 │    3  │  1416   │      1 │ [ 0, 1, 1, 1 ]     │ 
│ db_test   │ binlog_test │   2 │    5  │  1437   │      1 │ [ 0, 3, 2, 0 ]     │ 
│ db_test   │ binlog_test │   3 │    2  │  1403   │      1 │ [ 0, 1, 1, 0 ]     │ 
└──────┴────────┴───┴────┴──────┴─────┴────────────┘
Last updated: 2026.03.31 16:19:34