This topic describes system tables that are relevant to the dynamic table feature of Hologres.
System table | Description |
Stores the metadata of dynamic tables. | |
Stores the data lineage information of dynamic tables. | |
Stores the information about refresh tasks that are running for dynamic tables. | |
Stores the historical data of refresh tasks for dynamic tables. |
hologres.hg_dynamic_table_properties
The hologres.hg_dynamic_table_properties system table is used to store the metadata of dynamic tables. The following table describes the fields in the system table.
Field | Description |
dynamic_table_namespace | The schema in which the dynamic table resides. |
dynamic_table_name | The name of the dynamic table. |
property_key and property_value | The name and value of each property in the dynamic table. Property details:
|
hologres.hg_dynamic_table_dependencies
The hologres.hg_dynamic_table_dependencies system table is used to store the data lineage information of dynamic tables. The following table describes the fields in the system table. Take note of the following items:
A dynamic table may correspond to multiple base tables. If a dynamic table corresponds to multiple base tables, multiple data records are generated in the system table.
A state table can also be considered as a base table and is stored in the
hologres_streaming_mvsystem schema by default. We recommend that you ignore the state table in actual use.You can use system tables such as pg_class to further distinguish base tables.
Field | Description |
table_namespace | The schema in which the base table resides. |
table_name | The name of the base table. |
dynamic_table_namespace | The schema in which the dynamic table resides. |
dynamic_table_name | The name of the dynamic table. |
dependency | The base table type. Valid values:
|
hologres.hg_dynamic_table_refresh_activity
The hologres.hg_dynamic_table_refresh_activity system table records only the information about refresh tasks that are running for dynamic tables. The following table describes the fields in the system table.
Field | Description |
pid | The process ID of a refresh task for the dynamic table. You can use the pid field to cancel a running refresh task. For more information, see the Cancel refresh tasks section of the "Maintain refresh tasks for dynamic tables" topic. |
datname | The database in which the dynamic table resides. |
query_id | The query ID that corresponds to the refresh task for the dynamic table. |
usename | The user who performs the refresh operation. |
query | The refresh query. |
refresh_mode | The data refresh mode. Valid values:
|
refresh_start | The start time of the refresh task. |
duration | The execution duration of the refresh task. |
serverless_queue_time_ms | The time spent by the refresh task in waiting for serverless computing resources. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_resource_used_time_ms | The time consumed by the refresh task in using serverless computing resources. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_allocated_cores | The specifications of serverless computing resources used for the refresh task. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_allocated_workers | The number of workers used by the refresh task. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
table_write | The dynamic table for which the refresh task is run. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
hologres.hg_dynamic_table_refresh_history
The hologres.hg_dynamic_table_refresh_history system table is used to store the historical data of refresh tasks for dynamic tables. By default, the historical data is retained for one month. The following table describes the fields in the system table.
Field | Description |
datname | The name of the database in which the dynamic table resides. |
schema_name | The schema in which the dynamic table resides. |
dynamic_table_name | The name of the dynamic table. |
query_id | The ID of the refresh query. You can go to the Query Insight page and use the query ID to view detailed query information. |
refresh_start | The start time of the refresh task. |
refresh_end | The end time of the refresh task. |
duration | The execution duration of the refresh task. |
refresh_latency | The latency generated when the refresh task finishes running. |
refresh_mode | The data refresh mode. Valid values:
|
status | The status of the refresh task. Valid values:
|
queue_time_ms | The time spent in applying for serverless computing resources. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_allocated_cores | The amount of used serverless computing resources. Unit: CUs. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_allocated_workers | The number of used workers. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
serverless_resource_used_time_ms | The time consumed in performing the query by using serverless computing resources, in milliseconds. The time spent in waiting for resources is excluded. Note This field is available only for refresh tasks that are run by using serverless computing resources. |
References
For more information about how to use the preceding system tables, see the following topics: