2. ANALYZE#
2.1. Synopsis#
ANALYZE * FROM <table_expression> [, ... ]
[ IN <range_expression> ]
table_expression ::= <table_name> | <find_expression>
range_expression ::= RANGE ( <start_time>, <end_time> )
| '[' RANGE ( <start_time>, <end_time> ) [, ... ] ']'
2.2. Description#
ANALYZE checks the storage data of one or more time-series tables. It
reports shards that contain errors. It does not repair the errors.
The result contains these columns:
$tableidentifies the table.shard offsetidentifies the start time of the shard.error countgives the number of columns that contain an error in the shard.
The result has no rows when ANALYZE does not find an error.
Currently, you must specify *. You cannot analyze selected columns.
ANALYZE does not support general tables that have no $timestamp
column.
If you omit IN, QuasarDB checks all shards in the selected tables. Use one
range or a list of ranges to limit the check.
2.3. Column-partitioned tables#
ANALYZE can check Column partitioning layouts. In the current implementation, it visits all populated column partitions, even when IN RANGE is specified. A selected key’s interval cannot be used as a row-time bound.
The existing shard offset result is the payload base offset; for column
partitions it is zero, rather than the selected key or a unique partition ID.
Do not use it to identify a column partition. See
Supported operations and limitations.
2.4. Parameters#
table_nameThe name of a time-series table to check.
find_expressionSelects time-series tables by tag, name prefix, name suffix, or type. For more information, refer to key/value lookups.
start_timeThe inclusive start of the range. For more information, refer to timestamps.
end_timeThe exclusive end of the range. You can specify an absolute time or a duration relative to
start_time.
2.5. Examples#
Check all shards in one table:
ANALYZE * FROM measurements
Check one time range:
ANALYZE * FROM measurements IN RANGE (2026-01-01, 2026-02-01)
Check two time ranges:
ANALYZE * FROM measurements IN [
RANGE (2026-01-01, +1month),
RANGE (2026-07-01, +1month)
]
Check all time-series tables that have a tag:
ANALYZE * FROM FIND(TAG='production' AND TYPE=TS)