Skip to content

Informational views overview

The full list of informational views available in TimescaleDB. Informational views provide detailed information about the state of your data, hypertables, chunks, and any jobs or policies you have in place

TimescaleDB makes complex database features like partitioning and data retention easy to use with our comprehensive APIs. TimescaleDB works hard to provide detailed information about the state of your data, hypertables, chunks, and any jobs or policies you have in place.

These informational views query TimescaleDB‘s internal catalog, system tables that store metadata about your database objects, configurations, and jobs. When you create a hypertable, add a retention policy, or schedule a job, TimescaleDB registers this information in its catalog. The views provide a convenient, user-friendly interface to access this metadata without directly querying internal tables.

View all hypertables with their size and compression status:

SELECT hypertable_name,
num_dimensions,
num_chunks,
compression_enabled
FROM timescaledb_information.hypertables;

View all chunks for a specific hypertable:

SELECT chunk_name,
range_start,
range_end,
is_compressed
FROM timescaledb_information.chunks
WHERE hypertable_name = 'conditions'
ORDER BY range_start DESC;

View all scheduled jobs and their next execution time:

SELECT job_id,
application_name,
schedule_interval,
next_start
FROM timescaledb_information.jobs
ORDER BY next_start;

View recent job runs and their success/failure status:

SELECT job_id,
last_run_started_at,
last_successful_finish,
last_run_status,
total_runs,
total_failures
FROM timescaledb_information.job_stats
ORDER BY last_run_started_at DESC
LIMIT 10;

Get information about all continuous aggregates:

SELECT view_name,
view_definition,
materialized_only,
compression_enabled,
finalized
FROM timescaledb_information.continuous_aggregates;