This document describes the relevant parameters for the running statistical information category in the system configuration parameters.
Notes!
To ensure the stability and security of the system, please be sure to manually modify the relevant parameters**.
Sets the default statistical sample target (number of values stored in the public value list) for table columns that do not set a specific column target through ALTER TABLE SET STATISTICS
.
| Data Type | Default Value | Value Range | Set Classification | | --- | --- | --- | | int | 100 | 1 ~ 10000 | master; session; reload |
These parameters control server-wide statistical data collection characteristics. When statistics collection is enabled, the generated data can be accessed through the pg_stat
and pg_statio
system view families.
Enables information collection for the current execution command for each session, and also the time when the command starts execution.
| Data Type | Default Value | Settings Category | | --- | --- | | boolean | on | master; session; reload; superuser |
Sets the maximum length limit for query text stored in the current_query
column of the pg_stat_activity
system directory.
| Data Type | Default Value | Value Range | Set Classification | | --- | --- | --- | | int | 1024 | 100 ~ 102400 | segment; system; restart |
Controls statistics on the collection of database activity.
| Data Type | Default Value | Settings Category | | --- | --- | | boolean | true | master; session; reload; superuser |
Enable statistics on counting and when used.
pl
to track only procedural language functions; specify all
to track SQL and C language functions.none
, which disables function statistics tracking.| Data Type | Default Value | Value Range | Set Classification | | --- | --- | --- | | enum | none | none / pl / all | master; session; reload |
Enable timing of system I/O calls.
off
, because when it is turned on again, it will repeatedly query the operating system for the current time, which will put significant load on some platforms.pg_test_timing
tool to measure the overhead of timing in your system. I/O timing information is displayed in pg_stat_database
, in EXPLAIN
output when the BUFFERS
option is used, and in pg_stat_statements
.| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload; superuser |
Collect resource queue statistics about database activity.
stats_queue_level
server configuration parameter will take effect only when resource management is set to resource queue.| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload |
Set up the directory where temporary statistics are stored.
| Data Type | Default Value | Settings Category | | --- | --- | | string | pa_stat_tmp | segments; system; reload; superuser |
For each query, performance statistics of the query execution program are written to the server log.
log_statement_stats
.| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | segment; system; restart |
For each query, the performance statistics of the query parser are written to the server log.
log_statement_stats
.| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload; superuser |
For each query, the performance statistics of the Postgres query optimizer (planner) are written to the server log.
log_statement_stats
.| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload; superuser |
For each query, the overall performance statistics of the query parser, optimizer, and execution engine are written to the server log.
| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload; superuser |
Specifies the mode to trigger automatic statistics collection using ANALYZE.
on_no_stats
option can trigger statistics collection for CREATE TABLE AS SELECT
, INSERT
, or COPY
operations on any table without statistics.on_change
option triggers statistics collection when the number of affected rows exceeds the threshold defined by gp_autostats_on_change_threshold
. Operations that can use on_change
to trigger automatic statistics collection include: CREATE TABLE AS SELECT
, UPDATE
, DELETE
, INSERT
, and COPY
.| Data Type | Default Value | Value Range | Set Classification | | --- | --- | --- | | enum | none | none / on_no_stats / on_change | master; session; reload |
Specifies the mode to trigger automatic statistics collection using the ANALYZE
statement in the procedural language function.- The none
option disables statistics collection; the on_no_stats
option CREATE TABLE AS SELECT
, INSERT
, or COPY
operation that triggers statistics collection by performing in any function without existing statistics tables.
on_change
option triggers statistics collection only if the number of affected rows exceeds the threshold defined by gp_autostats_on_change_threshold
. The operations that can use on_change
to trigger the automatic information statistics collection function include: CREATE TABLE AS SELECT
, UPDATE
, DELETE
, INSERT
, and COPY
. | Data Type | Default Value | Value Range | Set Classification |
| --- | --- |
| enum | none | none / on_change / on_no_stats | master; session; reload |When gp_autostats_mode
is set to on_change
, the threshold value for automatic statistics collection is specified.
ANALYZE
is added and the table statistics are collected.| Data Type | Default Value | Value Range | Set Classification | | --- | --- | | int | 2147483647 | 0 ~ INT_MAX | master; session; reload |
Record information about the automatic ANALYZE operation related to gp_autostats_mode
and gp_autostats_on_change_threshold
.
| Data Type | Default Value | Settings Category | | --- | --- | | boolean | off | master; session; reload; superuser |