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.
Samples
Section titled “Samples”Get all hypertables in your database
Section titled “Get all hypertables in your database”View all hypertables with their size and compression status:
SELECT hypertable_name, num_dimensions, num_chunks, compression_enabledFROM timescaledb_information.hypertables;Check chunk information for a hypertable
Section titled “Check chunk information for a hypertable”View all chunks for a specific hypertable:
SELECT chunk_name, range_start, range_end, is_compressedFROM timescaledb_information.chunksWHERE hypertable_name = 'conditions'ORDER BY range_start DESC;Monitor background jobs
Section titled “Monitor background jobs”View all scheduled jobs and their next execution time:
SELECT job_id, application_name, schedule_interval, next_startFROM timescaledb_information.jobsORDER BY next_start;Check job execution history
Section titled “Check job execution history”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_failuresFROM timescaledb_information.job_statsORDER BY last_run_started_at DESCLIMIT 10;View continuous aggregate details
Section titled “View continuous aggregate details”Get information about all continuous aggregates:
SELECT view_name, view_definition, materialized_only, compression_enabled, finalizedFROM timescaledb_information.continuous_aggregates;Available views
Section titled “Available views”Hypertable and chunk information
Section titled “Hypertable and chunk information”timescaledb_information.chunks: get metadata about hypertable chunkstimescaledb_information.dimensions: get information on the dimensions of hypertablestimescaledb_information.hypertables: get metadata about hypertables
Columnstore information
Section titled “Columnstore information”timescaledb_information.chunk_columnstore_settings: get information about columnstore settings for all chunkstimescaledb_information.hypertable_columnstore_settings: get information about columnstore settings for all hypertables
Continuous aggregates
Section titled “Continuous aggregates”timescaledb_information.continuous_aggregates: get metadata and settings information for continuous aggregates
Jobs and policies
Section titled “Jobs and policies”timescaledb_information.job_errors: get information about background job errorstimescaledb_information.job_history: get information about background job executiontimescaledb_information.job_stats: get information and statistics about automatically run jobstimescaledb_information.jobs: get information about all jobs registered with the automatic schedulertimescaledb_experimental.policies: get information about all policies set on continuous aggregates