timescaledb_information.continuous_aggregates

Get metadata and settings information for continuous aggregates.

Available columns

NameTypeDescription
hypertable_schemaTEXTSchema of the hypertable from the continuous aggregate view
hypertable_nameTEXTName of the hypertable from the continuous aggregate view
view_schemaTEXTSchema for continuous aggregate view
view_nameTEXTUser supplied name for continuous aggregate view
view_ownerTEXTOwner of the continuous aggregate view
materialized_onlyBOOLEANReturn only materialized data when querying the continuous aggregate view
compression_enabledBOOLEANIs compression enabled for the continuous aggregate view?
materialization_hypertable_schemaTEXTSchema of the underlying materialization table
materialization_hypertable_nameTEXTName of the underlying materialization table
view_definitionTEXTSELECT query for continuous aggregate view
finalizedBOOLEANWhether the continuous aggregate stores data in finalized or partial form. Since TimescaleDB 2.7, the default is finalized.

Sample usage

  1. SELECT * FROM timescaledb_information.continuous_aggregates;
  2. -[ RECORD 1 ]---------------------+-------------------------------------------------
  3. hypertable_schema | public
  4. hypertable_name | foo
  5. view_schema | public
  6. view_name | contagg_view
  7. view_owner | postgres
  8. materialized_only | f
  9. compression_enabled | f
  10. materialization_hypertable_schema | _timescaledb_internal
  11. materialization_hypertable_name | _materialized_hypertable_2
  12. view_definition | SELECT foo.a, +
  13. | COUNT(foo.b) AS countb +
  14. | FROM foo +
  15. | GROUP BY (time_bucket('1 day', foo.a)), foo.a;
  16. finalized | t