System Views
This document introduces selected system views available in SynxDB.
gp_stat_progress_create_index
gp_stat_progress_create_index is a system view that shows real-time progress for ongoing CREATE INDEX or REINDEX operations in the current database.
This view displays detailed status information for each backend process building an index, including the current execution phase, the number of tuples processed, blocks scanned, and more. Once the operation completes, the corresponding entries are automatically removed from the view.
In SynxDB, this view also supports AO (Append-Optimized) tables and can be used to observe the phase-wise progress of index creation on such tables.
Typical use cases include:
Monitoring index creation or rebuild operations in real time.
Analyzing performance bottlenecks of long-running
CREATE INDEXorREINDEXcommands.Checking if any index operations are currently consuming system resources.
Correlating with
gp_stat_activityto trace backend process details.
Example queries:
-- Views all ongoing index creation tasks
SELECT * FROM gp_stat_progress_create_index;
-- Views index progress for a specific table
SELECT * FROM gp_stat_progress_create_index
WHERE relid = 'ao_test'::regclass;
Field |
Description |
|---|---|
|
ID of the segment where this entry resides. Only applicable in a distributed environment. |
|
Process ID of the backend. Can be joined with |
|
OID of the database, corresponding to |
|
Name of the database. |
|
OID of the table being indexed, corresponding to |
|
OID of the index being built. |
|
Type of command being executed: either |
|
Current phase of execution, such as:
|
|
Total number of sessions holding locks (if any). |
|
Number of sessions that have released their locks. |
|
Process ID of the session currently holding the lock (if waiting). |
|
Total number of data blocks to scan (might be 0 if unavailable or not started). |
|
Number of data blocks scanned so far. |
|
Estimated total number of tuples to process (if computable). |
|
Number of tuples processed so far. |
|
Total number of partitions (for partitioned tables, if applicable). |
|
Number of partitions processed (if applicable). |
Note
This view only displays currently running index operations. Entries are removed once the operation completes.
For small tables, index creation might complete instantly, and the view might return no rows.
To better observe progress, try creating an index on a large table or use complex columns (for example, large text) to slow down execution.
Progress is also reported when building indexes on AO (Append-Optimized) tables.
You can join this view with
gp_stat_activityusing thepidfield.SELECT a.usename, a.query, p.phase, p.blocks_done, p.blocks_total FROM gp_stat_activity a JOIN gp_stat_progress_create_index p ON a.pid = p.pid;
gp_stat_progress_create_index_summary
The gp_stat_progress_create_index_summary view provides a cluster-wide summary of CREATE INDEX or REINDEX operations. It aggregates progress data from all segments, offering a global overview of ongoing index-building tasks.
Field |
Data type |
Description |
|---|---|---|
|
|
Process ID of the leader backend running the index operation. |
|
|
OID of the database where the operation is running. |
|
|
Name of the database. |
|
|
OID of the table being indexed. |
|
|
OID of the index being built. |
|
|
Type of command being executed: |
|
|
Current processing phase of the |
|
|
Total number of sessions holding locks across the cluster (if any). |
|
|
Total number of sessions that have released their locks across the cluster. |
|
|
Process ID of the session currently holding a lock (if waiting). |
|
|
Total number of data blocks to scan across the cluster. |
|
|
Total number of data blocks scanned so far across the cluster. |
|
|
Estimated total number of tuples to process across the cluster. |
|
|
Total number of tuples processed so far across the cluster. |
|
|
Total number of partitions for partitioned tables across the cluster (if applicable). |
|
|
Total number of partitions processed across the cluster (if applicable). |
gp_stat_activity
The gp_stat_activity view shows real-time information about all active processes in the database. It is a core tool for monitoring and diagnosing database activity, query performance, and concurrency issues.
In a MPP architecture, this view aggregates process information from the Coordinator node and all segment nodes, providing a global snapshot of activity. By querying this view, database administrators can understand which users are connected, what queries are being executed, the duration of queries, whether processes are in a wait state, and the usage of resource queues.
Compared to PostgreSQL’s pg_stat_activity, gp_stat_activity adds columns such as gp_segment_id, sess_id, leader_pid, and query_id to better reflect query execution in a distributed environment.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment instance where the process is running. -1 represents the Coordinator node, while 0 or a positive number represents the corresponding segment node. This is a specific field for the MPP architecture. |
|
|
The OID of the database to which the process is connected. |
|
|
The name of the database to which the process is connected. |
|
|
The operating system process ID of the backend process. |
|
|
The session identifier, used to uniquely identify a user session. The same session has the same |
|
|
The process ID of the Query Dispatcher for the query execution. If this process is the leader, this field is equal to |
|
|
The OID of the logged-in user. |
|
|
The name of the logged-in user. |
|
|
The application name set by the client upon connection. |
|
|
The IP address of the client. |
|
|
The hostname of the client (if resolvable). |
|
|
The TCP port number the client is using for the connection. -1 indicates it is a local process. |
|
|
The time when the process was started. |
|
|
The time when the current transaction began. NULL if no transaction is active. |
|
|
The time when the currently active query began execution. |
|
|
The time when the process state was last changed. |
|
|
The type of event for which the process is waiting, e.g., |
|
|
The specific wait event name, e.g., waiting for a specific lock or buffer I/O. |
|
|
The current state of the process. Common values include: |
|
|
The top-level transaction identifier of the current backend process, if any. |
|
|
The |
|
|
The unique identifier for the query. Can be used to correlate the same query across views like |
|
|
The text of the query currently being executed by the process. |
|
|
The type of the backend process, e.g., |
|
|
The OID of the resource group to which the process belongs. |
|
|
The name of the resource group to which the process belongs. |
gp_stat_all_indexes
The gp_stat_all_indexes view displays usage statistics for each index in the database, with data collected from each segment node. This view allows you to see the number of scans, tuples read, and tuples fetched for each index on each segment, providing a basis for analyzing index efficiency and identifying unused indexes.
This view is crucial for performance tuning in a distributed environment. For instance, if an index is heavily used on some segments but rarely or never used on others, it could indicate data skew or an uneven distribution of queries.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The number of index scans initiated on this index. |
|
|
The number of index entries returned by scans on this index. |
|
|
The number of live table rows fetched by simple index scans using this index. |
gp_stat_all_indexes_summary
The gp_stat_all_indexes_summary view provides a global summary of usage statistics for each index in the database. It aggregates data from the gp_stat_all_indexes view across all segment nodes, showing the total number of scans and tuples processed for each index across the entire cluster.
This view is very useful for quickly assessing the overall usage of indexes. It can help database administrators identify which indexes are the busiest in the system or which have never been used, thus supporting decisions on index optimization and cleanup.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The total number of index scans initiated on this index across the cluster. |
|
|
The total number of index entries returned by scans on this index across the cluster. |
|
|
The total number of live table rows fetched by simple index scans using this index across the cluster. |
gp_stat_all_tables
The gp_stat_all_tables view presents detailed statistics for each table in the database, with data sourced from every segment node. It provides a comprehensive overview of table access (sequential and index scans), tuple activity (inserts, updates, deletes), and maintenance operations (vacuum and analyze).
By using this view, database administrators can gain deep insights into the activity of each table on every segment. This is crucial for identifying hot tables, diagnosing performance bottlenecks, planning maintenance strategies, and detecting issues like data skew.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The number of sequential scans initiated on this table. |
|
|
The number of tuples read by sequential scans. |
|
|
The number of index scans initiated on this table. |
|
|
The number of tuples fetched by index scans. |
|
|
The number of tuples inserted into the table. |
|
|
The number of tuples updated (including HOT updates). |
|
|
The number of tuples deleted. |
|
|
The number of Heap-Only Tuple (HOT) updates. |
|
|
The estimated number of live tuples. |
|
|
The estimated number of dead tuples. |
|
|
The estimated number of tuples modified since this table was last analyzed. |
|
|
The number of tuples inserted since this table was last vacuumed. |
|
|
The time this table was last manually vacuumed. |
|
|
The time this table was last vacuumed by the autovacuum process. |
|
|
The time this table was last manually analyzed. |
|
|
The time this table was last analyzed by the autoanalyze process. |
|
|
The number of times this table has been manually vacuumed. |
|
|
The number of times this table has been vacuumed by the autovacuum process. |
|
|
The number of times this table has been manually analyzed. |
|
|
The number of times this table has been analyzed by the autoanalyze process. |
gp_stat_all_tables_summary
The gp_stat_all_tables_summary view provides a global summary of usage statistics for each table in the database. It aggregates data from the gp_stat_all_tables view across all segment nodes, showing the total access counts, total tuple activity, and the most recent maintenance operation times for each table across the entire cluster.
This view is useful for quickly assessing the health and activity patterns of tables at a macro level, helping DBAs to rapidly identify the most active or maintenance-needy tables in the cluster.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The total number of sequential scans initiated on this table across the cluster. |
|
|
The total number of tuples read by sequential scans across the cluster. |
|
|
The total number of index scans initiated on this table across the cluster. |
|
|
The total number of tuples fetched by index scans across the cluster. |
|
|
The total number of tuples inserted into the table across the cluster. |
|
|
The total number of tuples updated (including HOT updates) across the cluster. |
|
|
The total number of tuples deleted across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates across the cluster. |
|
|
The total estimated number of live tuples across the cluster. |
|
|
The total estimated number of dead tuples across the cluster. |
|
|
The total estimated number of tuples modified since this table was last analyzed across the cluster. |
|
|
The most recent time this table was manually vacuumed across the cluster. |
|
|
The most recent time this table was vacuumed by the autovacuum process across the cluster. |
|
|
The most recent time this table was manually analyzed across the cluster. |
|
|
The most recent time this table was analyzed by the autoanalyze process across the cluster. |
|
|
The total number of times this table has been manually vacuumed across the cluster. |
|
|
The total number of times this table has been vacuumed by the autovacuum process across the cluster. |
|
|
The total number of times this table has been manually analyzed across the cluster. |
|
|
The total number of times this table has been analyzed by the autoanalyze process across the cluster. |
gp_stat_archiver
The gp_stat_archiver view displays status information about the database’s WAL (Write-Ahead Log) archiver process, with data from each segment node. This view allows for monitoring archival activities on each segment, including the number of logs successfully archived, the number of failures, and the time of the last archival, which is critical for database backup and recovery strategies.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The number of WAL files successfully archived. |
|
|
The name of the last WAL file successfully archived. |
|
|
The time of the last successful archival. |
|
|
The number of WAL files that failed to be archived. |
|
|
The name of the last WAL file that failed to be archived. |
|
|
The time of the last failed archival attempt. |
|
|
The time at which these statistics were last reset. |
gp_stat_archiver_summary
The gp_stat_archiver_summary view provides a summary of the WAL archiver’s status across the entire cluster. It aggregates archival statistics from all segment nodes, allowing DBAs to quickly assess the overall health of the archiving system.
Field |
Data type |
Description |
|---|---|---|
|
|
The total number of WAL files successfully archived across the cluster. |
|
|
The name of the last WAL file successfully archived across the cluster. |
|
|
The time of the last successful archival across the cluster. |
|
|
The total number of WAL files that failed to be archived across the cluster. |
|
|
The name of the last WAL file that failed to be archived across the cluster. |
|
|
The time of the last failed archival attempt across the cluster. |
|
|
The most recent time at which these statistics were reset across the cluster. |
gp_stat_bgwriter
The gp_stat_bgwriter view displays statistics about the activity of the background writer process, with data from each segment node. The background writer is responsible for writing “dirty” shared buffers to disk, reducing the workload for server processes during checkpoints. Monitoring this view helps in understanding the load and efficiency of the I/O system.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The number of scheduled checkpoints that have been performed (triggered by timeout). |
|
|
The number of requested checkpoints that have been performed (triggered by the |
|
|
The total amount of time, in milliseconds, that has been spent writing buffers to file during checkpoints. |
|
|
The total amount of time, in milliseconds, that has been spent syncing files to disk during checkpoints. |
|
|
The number of buffers written during checkpoints. |
|
|
The number of buffers written by the background writer. |
|
|
The number of times the background writer stopped due to writing too many dirty buffers. |
|
|
The number of buffers written directly by a backend. |
|
|
The number of times a backend had to execute its own |
|
|
The number of buffers allocated. |
|
|
The time at which these statistics were last reset. |
gp_stat_bgwriter_summary
The gp_stat_bgwriter_summary view provides a summary of the background writer’s activity statistics across the entire cluster. It aggregates data from all segment nodes’ gp_stat_bgwriter views, allowing DBAs to assess the cluster’s I/O performance and checkpoint efficiency from a global perspective.
Field |
Data type |
Description |
|---|---|---|
|
|
The total number of scheduled checkpoints performed across the cluster (triggered by timeout). |
|
|
The total number of requested checkpoints performed across the cluster (triggered by the |
|
|
The total amount of time, in milliseconds, spent writing buffers to file during checkpoints across the cluster. |
|
|
The total amount of time, in milliseconds, spent syncing files to disk during checkpoints across the cluster. |
|
|
The total number of buffers written during checkpoints across the cluster. |
|
|
The total number of buffers written by the background writer across the cluster. |
|
|
The total number of times the background writer stopped due to writing too many dirty buffers across the cluster. |
|
|
The total number of buffers written directly by a backend across the cluster. |
|
|
The total number of times a backend had to execute its own |
|
|
The total number of buffers allocated across the cluster. |
|
|
The most recent time at which these statistics were reset across the cluster. |
gp_stat_database
The gp_stat_database view provides detailed statistics for each database, with data sourced from each segment node. It includes metrics on backend connections, transaction commits and rollbacks, disk block reads and writes, tuple activity, and session timings.
This view allows DBAs to gain in-depth understanding of the load and health of each database on every segment, making it a crucial tool for diagnosing performance issues, analyzing database activity patterns, and planning for capacity.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the database. |
|
|
The name of the database. |
|
|
The number of backends currently connected to this database. |
|
|
The total number of transactions committed in this database. |
|
|
The total number of transactions rolled back in this database. |
|
|
The number of disk blocks read. |
|
|
The number of times disk blocks were found in the buffer cache. |
|
|
The number of tuples returned by queries. |
|
|
The number of tuples fetched by queries. |
|
|
The number of tuples inserted. |
|
|
The number of tuples updated. |
|
|
The number of tuples deleted. |
|
|
The number of queries canceled due to conflicts with recovery. |
|
|
The number of temporary files created. |
|
|
The total amount of data written to temporary files. |
|
|
The number of deadlocks detected. |
|
|
The number of checksum failures detected. |
|
|
The time of the last checksum failure. |
|
|
The total time spent by backends reading data file blocks, in milliseconds. |
|
|
The total time spent by backends writing data file blocks, in milliseconds. |
|
|
The total time spent by sessions in this database, in milliseconds. |
|
|
The total time spent by sessions executing statements in this database, in milliseconds. |
|
|
The total time spent by sessions idle in a transaction in this database, in milliseconds. |
|
|
The total number of sessions started in this database. |
|
|
The number of sessions that were abandoned. |
|
|
The number of sessions that experienced a fatal error. |
|
|
The number of sessions terminated by an operator. |
|
|
The time at which these statistics were last reset. |
gp_stat_database_summary
The gp_stat_database_summary view provides a global summary of database activity. It aggregates data from the gp_stat_database view across all segment nodes, showing total connections, transaction volumes, I/O, and tuple activity for each database across the entire cluster.
This view is useful for quickly identifying which databases are the busiest in the system and for assessing overall workload from a high level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the database. |
|
|
The name of the database. |
|
|
The total number of backends currently connected to this database across the cluster. |
|
|
The total number of transactions committed in this database across the cluster. |
|
|
The total number of transactions rolled back in this database across the cluster. |
|
|
The total number of disk blocks read across the cluster. |
|
|
The total number of times disk blocks were found in the buffer cache across the cluster. |
|
|
The total number of tuples returned by queries across the cluster. |
|
|
The total number of tuples fetched by queries across the cluster. |
|
|
The total number of tuples inserted across the cluster. |
|
|
The total number of tuples updated across the cluster. |
|
|
The total number of tuples deleted across the cluster. |
|
|
The total number of queries canceled due to conflicts with recovery across the cluster. |
|
|
The total number of temporary files created across the cluster. |
|
|
The total amount of data written to temporary files across the cluster. |
|
|
The total number of deadlocks detected across the cluster. |
|
|
The total number of checksum failures detected across the cluster. |
|
|
The time of the last checksum failure across the cluster. |
|
|
The total time spent by backends reading data file blocks, in milliseconds, across the cluster. |
|
|
The total time spent by backends writing data file blocks, in milliseconds, across the cluster. |
|
|
The most recent time at which these statistics were reset across the cluster. |
gp_stat_gssapi
The gp_stat_gssapi view shows information about connections authenticated via GSSAPI, with data from each segment node. GSSAPI is a generic interface for security services, often used for authentication systems like Kerberos. This view is essential for monitoring and auditing secure connections.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The process ID of the backend. |
|
|
|
|
|
The principal of the client that was authenticated via GSSAPI. |
|
|
|
gp_stat_operations
The gp_stat_operations view provides a log of Data Definition Language (DDL) operations that have occurred on database objects across all segments. It tracks actions such as CREATE, ALTER, and DROP on objects like tables, indexes, and views. This view is useful for auditing DDL changes and understanding the history of object modifications in a distributed environment.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node where the operation was recorded. |
|
|
The system catalog name to which the object belongs (e.g., |
|
|
The name of the object that was operated on. |
|
|
The OID of the object. |
|
|
The name of the schema to which the object belongs. |
|
|
The status of the DDL operation (e.g., |
|
|
The name of the user who performed the operation. |
|
|
The main type of DDL operation (e.g., |
|
|
A more specific description of the operation subtype (e.g., |
|
|
The time at which the operation was executed. |
gp_stat_progress_analyze
The gp_stat_progress_analyze view shows the real-time progress of ANALYZE operations running on the database. It provides detailed, phase-by-phase information for each backend process performing an analysis, including blocks scanned and child table progress. The corresponding entries are removed upon completion of the ANALYZE operation.
Field |
Data type |
Description |
|---|---|---|
|
|
ID of the segment where this entry resides. |
|
|
Process ID of the backend running |
|
|
OID of the database where the operation is running. |
|
|
Name of the database. |
|
|
OID of the table being analyzed. |
|
|
Current processing phase of the |
|
|
Total number of blocks to be sampled from the table. |
|
|
Number of blocks sampled so far. |
|
|
Total number of extended statistics targets to compute. |
|
|
Number of extended statistics targets computed so far. |
|
|
Total number of child tables to be processed (for partitioned tables). |
|
|
Number of child tables processed so far. |
|
|
OID of the child table currently being processed (if any). |
gp_stat_progress_analyze_summary
The gp_stat_progress_analyze_summary view provides a cluster-wide summary of ANALYZE operations. It aggregates the progress data from all segments, offering a global overview of ongoing analysis tasks. This is particularly useful for monitoring the overall progress on large partitioned tables.
Field |
Data type |
Description |
|---|---|---|
|
|
Process ID of the leader backend running |
|
|
OID of the database where the operation is running. |
|
|
Name of the database. |
|
|
OID of the table being analyzed. |
|
|
Current processing phase of the |
|
|
Total number of blocks to be sampled across all segments. |
|
|
Total number of blocks sampled so far across all segments. |
|
|
Total number of extended statistics targets to compute across all segments. |
|
|
Total number of extended statistics targets computed so far across all segments. |
|
|
Total number of child tables to be processed across all segments. |
|
|
Total number of child tables processed so far across all segments. |
gp_stat_progress_basebackup
The gp_stat_progress_basebackup view monitors the progress of a physical base backup being taken. This view is essential for DBAs to track the real-time status of backup operations, ensuring that data is being streamed correctly and estimating completion times.
Field |
Data type |
Description |
|---|---|---|
|
|
ID of the segment from which the backup data is being streamed. |
|
|
Process ID of the backend performing the base backup. |
|
|
Current phase of the backup process. Phases can be |
|
|
The total amount of data to be backed up, in bytes. |
|
|
The amount of data that has been streamed so far, in bytes. |
|
|
The total number of tablespaces to be backed up. |
|
|
The number of tablespaces that have been streamed so far. |
gp_stat_progress_cluster
The gp_stat_progress_cluster view reports the progress of CLUSTER and VACUUM FULL operations. It provides a detailed look into the progress on each segment, showing how much of the table has been processed.
Field |
Data type |
Description |
|---|---|---|
|
|
ID of the segment where the operation is running. |
|
|
Process ID of the backend performing the operation. |
|
|
OID of the database. |
|
|
Name of the database. |
|
|
OID of the table being clustered or vacuumed. |
|
|
The command being executed ( |
|
|
Current phase of the operation, e.g., |
|
|
OID of the index being used for clustering, if any. |
|
|
Number of tuples scanned from the original table. |
|
|
Number of tuples written to the new table. |
|
|
Total number of heap blocks in the table. |
|
|
Number of heap blocks scanned so far. |
|
|
Number of indexes that have been rebuilt. |
gp_stat_progress_cluster_summary
The gp_stat_progress_cluster_summary view provides a cluster-wide summary of CLUSTER and VACUUM FULL operations. It aggregates the progress from all segments to give a global overview.
Field |
Data type |
Description |
|---|---|---|
|
|
Process ID of the leader backend for the operation. |
|
|
OID of the database. |
|
|
Name of the database. |
|
|
OID of the table being processed. |
|
|
The command being executed ( |
|
|
Current phase of the operation across the cluster. |
|
|
OID of the index being used for clustering, if any. |
|
|
Total number of tuples scanned across all segments. |
|
|
Total number of tuples written across all segments. |
|
|
Total number of heap blocks across all segments. |
|
|
Total number of heap blocks scanned across all segments. |
|
|
Total number of indexes rebuilt across all segments. |
gp_stat_progress_copy
The gp_stat_progress_copy view provides real-time progress for COPY commands. It is particularly useful for monitoring large data loading operations, showing bytes and tuples processed.
Field |
Data type |
Description |
|---|---|---|
|
|
ID of the segment where the |
|
|
Process ID of the backend executing the |
|
|
OID of the database. |
|
|
Name of the database. |
|
|
OID of the table being copied to or from. |
|
|
The |
|
|
The source or destination type (e.g., |
|
|
Number of bytes processed so far. |
|
|
Total number of bytes to be processed (if known). |
|
|
Number of tuples (rows) processed so far. |
|
|
Number of tuples excluded due to |
gp_stat_progress_vacuum_summary
The gp_stat_progress_vacuum_summary view provides a cluster-wide summary of VACUUM operations. It aggregates progress data from all segments, offering a global overview of ongoing vacuum tasks, which is especially useful for monitoring the maintenance progress on large, distributed tables.
Field |
Data type |
Description |
|---|---|---|
|
|
Process ID of the leader backend running |
|
|
OID of the database where the operation is running. |
|
|
Name of the database. |
|
|
OID of the table being vacuumed. |
|
|
Current processing phase of the |
|
|
Total number of heap blocks in the table across the cluster. |
|
|
Total number of heap blocks scanned so far across the cluster. |
|
|
Total number of heap blocks vacuumed so far across the cluster. |
|
|
Total number of indexes vacuumed so far across the cluster. |
|
|
The total maximum number of dead tuples that the autovacuum worker expects to find across the cluster. |
|
|
The total number of dead tuples removed so far across the cluster. |
gp_stat_slru_summary
The gp_stat_slru_summary view provides summary statistics for “Simple Least Recently Used” (SLRU) caches across the entire cluster. SLRU caches are used to manage data that does not fit in the main shared buffers, such as transaction status (e.g., Commit Log). This view helps in monitoring the performance and I/O of these critical internal caches.
Field |
Data type |
Description |
|---|---|---|
|
|
Name of the SLRU cache (e.g., |
|
|
Total number of blocks zeroed out during creation across the cluster. |
|
|
Total number of times a block was found in the SLRU cache, avoiding a disk read, across the cluster. |
|
|
Total number of blocks read from disk for this cache across the cluster. |
|
|
Total number of blocks written to disk for this cache across the cluster. |
|
|
Total number of blocks that already existed on disk when a write was attempted (write was skipped) across the cluster. |
|
|
Total number of times the cache was flushed to disk across the cluster. |
|
|
Total number of times the cache was truncated across the cluster. |
|
|
The most recent time at which these statistics were reset across the cluster. |
gp_stat_sys_indexes_summary
The gp_stat_sys_indexes_summary view provides a global summary of usage statistics for system catalog indexes. It aggregates data from the gp_stat_sys_indexes view across all segment nodes, showing the total number of scans and tuples processed for each system index across the entire cluster.
This view is important for monitoring and tuning the performance of internal database operations, as it can help identify inefficient or unused indexes on system catalogs.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to (usually |
|
|
The name of the system table for this index. |
|
|
The name of the index. |
|
|
The total number of index scans initiated on this index across the cluster. |
|
|
The total number of index entries returned by scans on this index across the cluster. |
|
|
The total number of live table rows fetched by simple index scans using this index across the cluster. |
gp_stat_sys_tables_summary
The gp_stat_sys_tables_summary view provides a global summary of activity on system catalog tables. It aggregates data from the gp_stat_sys_tables view across all segment nodes, showing the total access counts, tuple activity, and the most recent maintenance operation times for each system table across the entire cluster.
This view is useful for quickly assessing the health and activity patterns of system tables at a macro level, helping DBAs to rapidly identify the most active or maintenance-needy system tables in the cluster.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system table. |
|
|
The name of the schema the system table belongs to (usually |
|
|
The name of the system table. |
|
|
The total number of sequential scans initiated on this system table across the cluster. |
|
|
The total number of tuples read by sequential scans across the cluster. |
|
|
The total number of index scans initiated on this system table across the cluster. |
|
|
The total number of tuples fetched by index scans across the cluster. |
|
|
The total number of tuples inserted into this system table across the cluster. |
|
|
The total number of tuples updated (including HOT updates) across the cluster. |
|
|
The total number of tuples deleted across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates across the cluster. |
|
|
The total estimated number of live tuples across the cluster. |
|
|
The total estimated number of dead tuples across the cluster. |
|
|
The total estimated number of tuples modified since this table was last analyzed across the cluster. |
|
|
The most recent time this system table was manually vacuumed across the cluster. |
|
|
The most recent time this system table was vacuumed by the autovacuum process across the cluster. |
|
|
The most recent time this system table was manually analyzed across the cluster. |
|
|
The most recent time this system table was analyzed by the autoanalyze process across the cluster. |
|
|
The total number of times this system table has been manually vacuumed across the cluster. |
|
|
The total number of times this system table has been vacuumed by the autovacuum process across the cluster. |
|
|
The total number of times this system table has been manually analyzed across the cluster. |
|
|
The total number of times this system table has been analyzed by the autoanalyze process across the cluster. |
gp_stat_user_functions_summary
The gp_stat_user_functions_summary view provides a global summary of execution statistics for user-defined functions. It shows the total number of calls, total execution time, and the self-execution time (time spent in the function itself, excluding other functions it calls) for each function.
This view is useful for identifying the most time-consuming or frequently called functions, making it a key tool for function-level performance optimization.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the function. |
|
|
The name of the schema the function belongs to. |
|
|
The name of the function. |
|
|
The total number of times the function has been called. |
|
|
The total time spent in the function and other functions called by it, in milliseconds. |
|
|
The time spent in the function itself, excluding other functions it calls, in milliseconds. |
gp_stat_user_indexes
The gp_stat_user_indexes view displays usage statistics for each index on user tables across each segment. It is similar to gp_stat_all_indexes but exclusively includes indexes on user tables, excluding those on system catalogs.
This view allows you to see the number of scans, tuples read, and tuples fetched for each user index on each segment, providing a basis for analyzing the efficiency of user table indexes and identifying unused ones.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The number of index scans initiated on this index. |
|
|
The number of index entries returned by scans on this index. |
|
|
The number of live table rows fetched by simple index scans using this index. |
gp_stat_user_indexes_summary
The gp_stat_user_indexes_summary view provides a global summary of usage statistics for user table indexes. It aggregates data from the gp_stat_user_indexes view across all segment nodes, showing the total number of scans and tuples processed for each user index across the entire cluster.
This view is useful for quickly assessing the overall usage of user indexes, helping database administrators identify which indexes are the busiest or which have never been used, thus supporting decisions on index optimization and cleanup.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The total number of index scans initiated on this index across the cluster. |
|
|
The total number of index entries returned by scans on this index across the cluster. |
|
|
The total number of live table rows fetched by simple index scans using this index across the cluster. |
gp_stat_wal_summary
The gp_stat_wal_summary view provides a summary of Write-Ahead Log (WAL) activity across the entire cluster. It aggregates data from the gp_stat_wal view across all segment nodes, showing the overall picture of WAL record generation, writes, and syncs.
This view is crucial for monitoring the I/O performance of the cluster and diagnosing WAL-related bottlenecks.
Field |
Data type |
Description |
|---|---|---|
|
|
Total number of WAL records generated across the cluster. |
|
|
Total number of full page writes (FPWs) made across the cluster. |
|
|
Total number of bytes of WAL generated across the cluster. |
|
|
Total number of times WAL buffers were written to disk because they became full across the cluster. |
|
|
Total number of times WAL buffers were written to disk across the cluster. |
|
|
Total number of times WAL files were synced to disk across the cluster. |
|
|
Total time spent writing WAL files, in milliseconds, across the cluster. |
|
|
Total time spent syncing WAL files, in milliseconds, across the cluster. |
|
|
The most recent time at which these statistics were reset across the cluster. |
gp_stat_xact_all_tables
The gp_stat_xact_all_tables view shows statistics about operations on each table within the current transaction, with data from each segment node. It only displays changes made by the current backend process in the current transaction.
This view is useful for understanding and diagnosing the behavior of specific transactions, helping to analyze table access patterns and resource consumption during a transaction.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The number of sequential scans initiated on this table in the current transaction. |
|
|
The number of tuples read by sequential scans in the current transaction. |
|
|
The number of index scans initiated on this table in the current transaction. |
|
|
The number of tuples fetched by index scans in the current transaction. |
|
|
The number of tuples inserted into the table in the current transaction. |
|
|
The number of tuples updated (including HOT updates) in the current transaction. |
|
|
The number of tuples deleted in the current transaction. |
|
|
The number of Heap-Only Tuple (HOT) updates in the current transaction. |
gp_stat_xact_all_tables_summary
The gp_stat_xact_all_tables_summary view provides a global summary of activity for all tables within the current transaction. It aggregates data from the gp_stat_xact_all_tables view across all segment nodes, showing the total access and tuple activity for each table across the entire cluster.
This view is useful for quickly understanding the impact of the current transaction on various tables at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The total number of sequential scans initiated on this table in the current transaction across the cluster. |
|
|
The total number of tuples read by sequential scans in the current transaction across the cluster. |
|
|
The total number of index scans initiated on this table in the current transaction across the cluster. |
|
|
The total number of tuples fetched by index scans in the current transaction across the cluster. |
|
|
The total number of tuples inserted into the table in the current transaction across the cluster. |
|
|
The total number of tuples updated (including HOT updates) in the current transaction across the cluster. |
|
|
The total number of tuples deleted in the current transaction across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates in the current transaction across the cluster. |
gp_stat_xact_sys_tables_summary
The gp_stat_xact_sys_tables_summary view provides a global summary of activity on system catalog tables within the current transaction. It aggregates data from the gp_stat_xact_sys_tables view across all segment nodes, showing the total access and tuple activity for each system table across the entire cluster.
This view is useful for understanding the impact of the current transaction on internal system catalogs.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system table. |
|
|
The name of the schema the system table belongs to. |
|
|
The name of the system table. |
|
|
The total number of sequential scans initiated on this system table in the current transaction across the cluster. |
|
|
The total number of tuples read by sequential scans in the current transaction across the cluster. |
|
|
The total number of index scans initiated on this system table in the current transaction across the cluster. |
|
|
The total number of tuples fetched by index scans in the current transaction across the cluster. |
|
|
The total number of tuples inserted into this system table in the current transaction across the cluster. |
|
|
The total number of tuples updated (including HOT updates) in the current transaction across the cluster. |
|
|
The total number of tuples deleted in the current transaction across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates in the current transaction across the cluster. |
gp_stat_xact_user_functions_summary
The gp_stat_xact_user_functions_summary view provides a global summary of execution statistics for user-defined functions within the current transaction. It shows the total number of calls, total execution time, and self-execution time for each function.
This view is useful for identifying the most expensive or frequently called functions within the current transaction, making it a key tool for function-level performance optimization.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the function. |
|
|
The name of the schema the function belongs to. |
|
|
The name of the function. |
|
|
The total number of times the function has been called in the current transaction. |
|
|
The total time spent in the function and other functions called by it, in milliseconds, in the current transaction. |
|
|
The time spent in the function itself, excluding other functions it calls, in milliseconds, in the current transaction. |
gp_stat_xact_user_tables_summary
The gp_stat_xact_user_tables_summary view provides a global summary of activity on user tables within the current transaction. It aggregates data from the gp_stat_xact_user_tables view across all segment nodes, showing the total access and tuple activity for each user table across the entire cluster.
This view is useful for quickly understanding the impact of the current transaction on various user tables at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the user table. |
|
|
The name of the schema the user table belongs to. |
|
|
The name of the user table. |
|
|
The total number of sequential scans initiated on this user table in the current transaction across the cluster. |
|
|
The total number of tuples read by sequential scans in the current transaction across the cluster. |
|
|
The total number of index scans initiated on this user table in the current transaction across the cluster. |
|
|
The total number of tuples fetched by index scans in the current transaction across the cluster. |
|
|
The total number of tuples inserted into this user table in the current transaction across the cluster. |
|
|
The total number of tuples updated (including HOT updates) in the current transaction across the cluster. |
|
|
The total number of tuples deleted in the current transaction across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates in the current transaction across the cluster. |
gp_statio_all_indexes
The gp_statio_all_indexes view provides I/O statistics for each index, with data from each segment node. It includes metrics on disk block reads and buffer hits, which are crucial for evaluating the I/O efficiency of indexes.
By using this view, DBAs can gain deep insights into the I/O activity of each index on every segment, making it an important tool for diagnosing index-related I/O performance issues.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The number of disk blocks read for this index. |
|
|
The number of buffer hits in this index. |
gp_statio_all_indexes_summary
The gp_statio_all_indexes_summary view provides a global summary of I/O activity for all indexes. It aggregates data from the gp_statio_all_indexes view across all segment nodes, showing the total disk block reads and buffer hits for each index across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of indexes at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the table for this index. |
|
|
The name of the index. |
|
|
The total number of disk blocks read for this index across the cluster. |
|
|
The total number of buffer hits in this index’s buffer cache across the cluster. |
gp_statio_all_sequences
The gp_statio_all_sequences view provides I/O statistics for each sequence, with data from each segment node. It includes metrics on disk block reads and buffer hits, which are crucial for evaluating the I/O efficiency of sequences.
By using this view, DBAs can gain deep insights into the I/O activity of each sequence on every segment, making it an important tool for diagnosing sequence-related I/O performance issues.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the sequence. |
|
|
The name of the schema the sequence belongs to. |
|
|
The name of the sequence. |
|
|
The number of disk blocks read for this sequence. |
|
|
The number of buffer hits in this sequence’s buffer cache. |
gp_statio_all_sequences_summary
The gp_statio_all_sequences_summary view provides a global summary of I/O activity for all sequences. It aggregates data from the gp_statio_all_sequences view across all segment nodes, showing the total disk block reads and buffer hits for each sequence across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of sequences at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the sequence. |
|
|
The name of the schema the sequence belongs to. |
|
|
The name of the sequence. |
|
|
The total number of disk blocks read for this sequence across the cluster. |
|
|
The total number of buffer hits in this sequence’s buffer cache across the cluster. |
gp_statio_all_tables_summary
The gp_statio_all_tables_summary view provides a global summary of I/O activity for all tables. It aggregates data from the gp_statio_all_tables view across all segment nodes, showing the total disk block reads and buffer hits for each table across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of tables at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The total number of heap disk blocks read for this table across the cluster. |
|
|
The total number of buffer hits in this table’s heap buffer cache across the cluster. |
|
|
The total number of disk blocks read for all indexes on this table across the cluster. |
|
|
The total number of buffer hits in all indexes on this table across the cluster. |
|
|
The total number of disk blocks read for this table’s TOAST table across the cluster. |
|
|
The total number of buffer hits in this table’s TOAST table buffer cache across the cluster. |
|
|
The total number of disk blocks read for this table’s TOAST table index across the cluster. |
|
|
The total number of buffer hits in this table’s TOAST table index buffer cache across the cluster. |
gp_statio_sys_indexes_summary
The gp_statio_sys_indexes_summary view provides a global summary of I/O activity for system catalog indexes. It aggregates data from the gp_statio_sys_indexes view across all segment nodes, showing the total disk block reads and buffer hits for each system index across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of system indexes at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the system table for this index. |
|
|
The name of the index. |
|
|
The total number of disk blocks read for this index across the cluster. |
|
|
The total number of buffer hits in this index’s buffer cache across the cluster. |
gp_statio_sys_sequences_summary
The gp_statio_sys_sequences_summary view provides a global summary of I/O activity for system sequences. It aggregates data from the gp_statio_sys_sequences view across all segment nodes, showing the total disk block reads and buffer hits for each system sequence across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of system sequences at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system sequence. |
|
|
The name of the schema the system sequence belongs to. |
|
|
The name of the system sequence. |
|
|
The total number of disk blocks read for this system sequence across the cluster. |
|
|
The total number of buffer hits in this system sequence’s buffer cache across the cluster. |
gp_statio_sys_tables_summary
The gp_statio_sys_tables_summary view provides a global summary of I/O activity for system tables. It aggregates data from the gp_statio_sys_tables view across all segment nodes, showing the total disk block reads and buffer hits for each system table across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of system tables at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the system table. |
|
|
The name of the schema the system table belongs to. |
|
|
The name of the system table. |
|
|
The total number of heap disk blocks read for this system table across the cluster. |
|
|
The total number of buffer hits in this system table’s heap buffer cache across the cluster. |
|
|
The total number of disk blocks read for all indexes on this system table across the cluster. |
|
|
The total number of buffer hits in all indexes on this system table across the cluster. |
|
|
The total number of disk blocks read for this system table’s TOAST table across the cluster. |
|
|
The total number of buffer hits in this system table’s TOAST table buffer cache across the cluster. |
|
|
The total number of disk blocks read for this system table’s TOAST table index across the cluster. |
|
|
The total number of buffer hits in this system table’s TOAST table index buffer cache across the cluster. |
gp_statio_user_indexes_summary
The gp_statio_user_indexes_summary view provides a global summary of I/O activity for user indexes. It aggregates data from the gp_statio_user_indexes view across all segment nodes, showing the total disk block reads and buffer hits for each user index across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of user indexes at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the user table for this index. |
|
|
The OID of the index itself. |
|
|
The name of the schema this index belongs to. |
|
|
The name of the user table for this index. |
|
|
The name of the index. |
|
|
The total number of disk blocks read for this index across the cluster. |
|
|
The total number of buffer hits in this index’s buffer cache across the cluster. |
gp_statio_user_sequences_summary
The gp_statio_user_sequences_summary view provides a global summary of I/O activity for user sequences. It aggregates data from the gp_statio_user_sequences view across all segment nodes, showing the total disk block reads and buffer hits for each user sequence across the entire cluster.
This view is useful for quickly assessing the I/O efficiency of user sequences at a macro level.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the user sequence. |
|
|
The name of the schema the user sequence belongs to. |
|
|
The name of the user sequence. |
|
|
The total number of disk blocks read for this user sequence across the cluster. |
|
|
The total number of buffer hits in this user sequence’s buffer cache across the cluster. |
gp_statio_user_tables
The gp_statio_user_tables view provides I/O statistics for each user table, with data from each segment node. It includes metrics on disk block reads and buffer hits for heaps, indexes, and TOAST tables, which are crucial for evaluating the I/O efficiency of user tables.
By using this view, DBAs can gain deep insights into the I/O activity of each user table on every segment, making it an important tool for diagnosing table-related I/O performance issues. This view includes only user tables, excluding system tables.
Field |
Data type |
Description |
|---|---|---|
|
|
The ID of the segment node to which this record belongs. |
|
|
The OID of the table. |
|
|
The name of the schema the table belongs to. |
|
|
The name of the table. |
|
|
The number of disk blocks read from this table’s heap. |
|
|
The number of buffer hits in this table’s heap. |
|
|
The number of disk blocks read from all indexes on this table. |
|
|
The number of buffer hits in all indexes on this table. |
|
|
The number of disk blocks read from this table’s TOAST table. |
|
|
The number of buffer hits in this table’s TOAST table. |
|
|
The number of disk blocks read from this table’s TOAST table index. |
|
|
The number of buffer hits in this table’s TOAST table index. |
gp_stat_user_tables_summary
The gp_stat_user_tables_summary view provides a global summary of activity on user tables. It aggregates data from the gp_stat_user_tables view across all segment nodes, showing total access counts, tuple activity, and the most recent maintenance operation times for each user table across the entire cluster.
This view is useful for quickly assessing the health and activity patterns of user tables at a macro level, helping DBAs to rapidly identify the most active or maintenance-needy user tables in the cluster.
Field |
Data type |
Description |
|---|---|---|
|
|
The OID of the user table. |
|
|
The name of the schema the user table belongs to. |
|
|
The name of the user table. |
|
|
The total number of sequential scans initiated on this user table across the cluster. |
|
|
The total number of tuples read by sequential scans across the cluster. |
|
|
The total number of index scans initiated on this user table across the cluster. |
|
|
The total number of tuples fetched by index scans across the cluster. |
|
|
The total number of tuples inserted into this user table across the cluster. |
|
|
The total number of tuples updated (including HOT updates) across the cluster. |
|
|
The total number of tuples deleted in the current transaction across the cluster. |
|
|
The total number of Heap-Only Tuple (HOT) updates across the cluster. |
|
|
The total estimated number of live tuples across the cluster. |
|
|
The total estimated number of dead tuples across the cluster. |
|
|
The total estimated number of tuples modified since this table was last analyzed across the cluster. |
|
|
The most recent time this user table was manually vacuumed across the cluster. |
|
|
The most recent time this user table was vacuumed by the autovacuum process across the cluster. |
|
|
The most recent time this user table was manually analyzed across the cluster. |
|
|
The most recent time this user table was analyzed by the autoanalyze process across the cluster. |
|
|
The total number of times this user table has been manually vacuumed across the cluster. |
|
|
The total number of times this user table has been vacuumed by the autovacuum process across the cluster. |
|
|
The total number of times this user table has been manually analyzed across the cluster. |
|
|
The total number of times this user table has been analyzed by the autoanalyze process across the cluster. |