thl stats
Version availability
Available in 8.0.4 and later.
The thl stats command provides summary statistics of THL content.
Usage
thl stats [common-options] [options]
| Option | Description | Version |
|---|---|---|
-file [filename] | Outputs statistics for all THL in the specified file. | |
-format [option] | Set the output style for the result. Default: table | Valid: table, csv, json | |
-from [seqno]Aliases: -low [seqno] | Outputs all statistics from the seqno provided to the last THL available. Can be combined with -from|-high to set a specific range. | |
-indexfrom [NN] | Used to specify a file range to produce statistics for. Specify the integer value from the starting THL file, for example to start from thl.data.0000000001 issue -indexfrom 1. MUST be used with -indexto to specify a file range. | |
-indexto [NN] | Used to specify a file range to produce statistics for. Specify the integer value from the ending THL file, for example to end at thl.data.0000000025 issue -indexto 25. MUST be used with -indexfrom to specify a file range. | |
-seqno [seqno] | Outputs statistics for the given seqno. | |
-timezone [timezone] | Time zone used when deriving event dates. Default: UTC | |
-to [seqno]Aliases: -high [seqno] | Outputs all statistics from the first seqno available up to the seqno provided. Can be combined with -to|-low to set a specific range. |
Example Output:
thl -service europe stats -from 1 -to 100
Done. 100 sequences processed (1562 seq/s)
DATE SCHEMA TABLE INSERT UPDATE DDL TOTAL
---------- --------------- ----------- ------ ------ --- -----
2026-05-18 tungsten_europe heartbeat 0 1 0 1
2026-05-18 (subtotal) 0 1 0 1
2026-05-21 hr countries 19 0 1 20
2026-05-21 hr departments 28 0 1 29
2026-05-21 hr employees 47 0 1 48
2026-05-21 hr job_history 1 0 0 1
2026-05-21 tungsten_europe heartbeat 0 1 0 1
2026-05-21 (subtotal) 95 1 3 99
---------- --------------- ----------- ------ ------ --- -----
TOTAL 95 2 3 100
Note
The following statements would be included in the DDL count:
- All Genuine DDL changes, such as CREATE TABLE etc
- TRUNCATE table statements
- Any DML issued when
bin-log-format=STATEMENT
Note
If your database is running in STATEMENT based logging mode, the counts will reflect number of statements executed, and only show as DDL counts.
If your database is running in ROW based logging, the counts for INSERT, UPDATE and DELETE will reflect actrual rows changed.