LOCALSYSTEMQUERIES System Table Description
Description
The LOCALSYSTEMQUERIES pseudo table provides information about execution time and memory consumption of (internal) system queries.
Client applications should never contain code that accesses SYSTEM pseudo tables as they are subject to, and furthermore likely to, change from release to release.
|
Fields
| Field | Type | Description |
|---|---|---|
AVERAGE_RUNTIME |
BIGINT |
Average duration of all executions, in microseconds. |
CURRENT_MEMORY_USAGE |
BIGINT |
Memory currently used. |
EXECUTION_COUNT |
BIGINT |
Number of (non-distinct) SQL statements executed. |
LAST_EXECUTION_PEAK_MEMORY_USAGE |
BIGINT |
Maximum memory used by the last execution. |
LAST_EXECUTION_RUNTIME |
BIGINT |
Duration of the last execution, in microseconds. |
MAX_PEAK_MEMORY_USAGE |
BIGINT |
Maximum memory used by for all executions. |
MAX_RUNTIME |
BIGINT |
Maximum duration of all executions, in microseconds. |
SQL |
STRING |
Last executed SQL statement. |
Example
SELECT * FROM SYSTEM.LOCALSYSTEMQUERIES LIMIT 1;
SQL LAST_EXECUTION_PEAK_MEMORY_USAGE LAST_EXECUTION_RUNTIME MAX_PEAK_MEMORY_USAGE MAX_RUNTIME AVERAGE_RUNTIME EXECUTION_COUNT CURRENT_MEMORY_USAGE
--------------------------------------------------------------------- --------------------------------- ----------------------- ---------------------- ------------ ---------------- ---------------- ---------------------
select cast(version as integer) from system.versions where property=? 13520 8 14448 38 12 12 12848
(1 row returned in 1.20ms)