Overview

What is EXA_STATISTICS

EXA_STATISTICS is a system schema built into every Exasol database. It continuously collects statistics about SQL execution, hardware resource usage, storage, and user sessions. Data is updated automatically every minute and is immediately available for querying — no configuration required.

The schema covers four functional areas:

  • SQL Activity — historical record of every executed statement

  • System Monitor — CPU, memory, I/O, and network metrics over time

  • Database Size — storage volume, compression ratios, and RAM recommendations

  • Audit — full audit trail of SQL statements and user sessions

Namespace Integration

EXA_STATISTICS and SYS are automatically integrated into Exasol’s namespace. You can query statistical tables directly without specifying the schema name:

-- Both are equivalent:
SELECT * FROM EXA_SQL_LAST_DAY;
SELECT * FROM EXA_STATISTICS.EXA_SQL_LAST_DAY;

Access Control

Most statistical tables are readable by all database users. Tables with DBA in their name contain sensitive data and require the SELECT ANY DICTIONARY system privilege.

Table Group

Required Privilege

EXA_SQL_*, EXA_MONITOR_*, EXA_DB_SIZE_*

None — any connected user

EXA_DBA_AUDIT_*

SELECT ANY DICTIONARY

To grant the privilege to a user:

GRANT SELECT ANY DICTIONARY TO my_user;

Aggregation Levels

Each metric category is available at multiple time granularities:

Suffix

Description

_LAST_DAY

Rolling 24-hour window — one row per measurement interval

_HOURLY

Aggregated per hour

_DAILY

Aggregated per calendar day

_MONTHLY

Aggregated per calendar month

Use _LAST_DAY tables for real-time investigation and the aggregated tables for trend analysis and capacity planning.

Time Zone

All timestamps in EXA_STATISTICS are stored in the database’s configured time zone (DBTIMEZONE). To check your current setting:

SELECT DBTIMEZONE;

Refreshing Statistics

Statistics are updated automatically every minute. To force an immediate refresh:

FLUSH STATISTICS;
COMMIT;

Note

Open a new transaction after flushing to see the latest data reflected in your queries.

Further reading: Statistical System Tables · FLUSH STATISTICS