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:

  • $table identifies the table.

  • shard offset identifies the start time of the shard.

  • error count gives 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. Parameters#

table_name

The name of a time-series table to check.

find_expression

Selects time-series tables by tag, name prefix, name suffix, or type. For more information, refer to key/value lookups.

start_time

The inclusive start of the range. For more information, refer to timestamps.

end_time

The exclusive end of the range. You can specify an absolute time or a duration relative to start_time.

2.4. 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)