HomeMogDBMogDB StackUqbar
v3.1

Documentation:v3.1

Supported Versions:

Other Versions:

Query

instr_unique_sql_count

Parameter description: Specifies the maximum number of Unique SQL records to be collected. The value 0 indicates that the function of collecting Unique SQL information is disabled.

If the value is changed from a larger one to a smaller one, Unique SQL statistics will be reset and re-collected. There is no impact if the value is changed from a smaller one to a larger one.

If the number of unique SQL entries generated in the system (to view the statistics, query dbe_perf.statement or dbe_perf.summary_statement) is greater than instr_unique_sql_count and the function of automatically eliminating unique SQL entries is enabled, the system automatically eliminates a certain proportion of entries based on the update time of unique SQL statements in descending order. In this way, new unique SQL entries can be collected. If the automatic elimination function is not enabled, new unique SQL information generated by the system will not be collected.

In the x86-based centralized deployment scenario, the hardware configuration specifications are 32-core CPU and 256 GB memory. When the Benchmark SQL 5.0 tool is used to test performance, the performance fluctuates by about 3% by enabling or disabling this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: an integer ranging from 0 to 2147483647

Default value: 100

img CAUTION:

  • If the automatic elimination function is enabled and this parameter is set to a small value, the system may frequently perform automatic elimination, which may affect the database system performance. Therefore, you are advised to set this parameter to 200000.
  • If automatic elimination is enabled and this parameter is set to a large value (for example, 38347922), a large memory problem may occur during the clearance. As a result, the clearance fails.

instr_unique_sql_track_type

Parameter description: Specifies which SQL statements are recorded in Unique SQL.

This parameter is an INTERNAL parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: enumerated values

top: Only top-level SQL statements are recorded.

Default value: top

enable_instr_rt_percentile

Parameter description: Specifies whether to enable the function of calculating the response time of 80% and 95% SQL statements in the system.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

  • on indicates that the function of calculating the response time of 80% and 95% SQL statements is enabled.
  • off indicates that the function of calculating the response time of 80% and 95% SQL statements is disabled.

Default value: on

percentile

Parameter description: Specifies the percentage of SQL statements whose response time is to be calculated by the background calculation thread.

This parameter is an INTERNAL parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: a string

Default value: 80, 95

instr_rt_percentile_interval

Parameter description: Specifies the interval at which the background calculation thread calculates the SQL response time.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: an integer ranging from 0 to 3600. The unit is s.

Default value: 10s

enable_instr_cpu_timer

Parameter description: Specifies whether to capture the CPU time consumed during SQL statement execution.

In the x86-based centralized deployment scenario, the hardware configuration specifications are 32-core CPU and 256 GB memory. When the Benchmark SQL 5.0 tool is used to test performance, the performance fluctuates by about 3.5% by enabling or disabling this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

  • on indicates the CPU time consumed during SQL statement execution is captured.
  • off indicates the CPU time consumed during SQL statement execution is not captured.

Default value: on

enable_stmt_track

Parameter description: Specifies whether to enable the full/slow SQL statement feature.

In the x86-based centralized deployment scenario, the hardware configuration specifications are 32-core CPU and 256 GB memory. When the Benchmark SQL 5.0 tool is used to test performance, the performance fluctuates by about 1.2% by enabling or disabling this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

  • on: Full/Slow SQL capture is enabled.
  • off: Full /Slow SQL capture is disabled.

Default value: on

track_stmt_session_slot

Parameter description: Specifies the maximum number of full/slow SQL statements that can be cached in a session. If the number of full/slow SQL statements exceeds this value, new statements will not be traced until the flush thread flushes the cached statements to the disk to reserve idle space.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: an integer ranging from 0 to 2147483647

Default value: 1000

track_stmt_details_size

Parameter description: Specifies the maximum size (in bytes) of execution events that can be collected by a single statement.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: an integer ranging from 0 to 100000000

Default value: 4096

track_stmt_retention_time

Parameter description: Specifies the retention period of full/slow SQL statement records. This parameter is a combination of parameters. This parameter is read every 60 seconds and records exceeding the retention period are deleted. Only the sysadmin user can access this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: a string

This parameter consists of two parts in the format of 'full sql retention time, slow sql retention time'.

full sql retention time indicates the retention time of full SQL statements. The value ranges from 0 to 86400.

slow sql retention time indicates the retention time of slow SQL statements. The value ranges from 0 to 604800.

Default value: 3600,604800

track_stmt_stat_level

Parameter description: Determines the level of statement execution tracing.

This parameter is a USERSET parameter. Set it based on instructions provided in Table 1 GUC parameters. The value is case-insensitive.

Value range: a string

This parameter consists of two parts in the format of 'full sql stat level, slow sql stat level'.

The first part indicates the tracing level of full SQL statements. The value can be OFF, L0, L1, or L2.

The second part indicates the tracing level of slow SQL statements. The value can be OFF, L0, L1, or L2.

img NOTE: If the full SQL tracing level is not OFF, the current SQL tracing level is the higher level (L2 > L1 > L0) of the full SQL and slow SQL statements. For details about the levels, see STATEMENT_HISTORY.

Default value: OFF,L0

enable_auto_clean_unique_sql

Parameter description: Specifies whether to enable the automatic elimination function of unique SQL statements when the number of unique SQL statements generated in the system is greater than or equal to the value of instr_unique_sql_count.

This parameter is a POSTMASTER parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: Boolean

Default value: off

img CAUTION: Some snapshot information comes from unique SQL statements. Therefore, when automatic elimination is enabled, if the selected start snapshot and end snapshot exceed the elimination time, the WDR report cannot be generated.

track_stmt_standby_chain_size

Parameter description: Specifies the maximum memory and disk space occupied by fast/slow SQL statement records on the standby node. This parameter is a combination of parameters. This parameter is read every 60 seconds and records exceeding the retention period are deleted. Only the sysadmin user can access this parameter.

This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1 GUC parameters.

Value range: a string

This parameter consists of four parts: fast sql memory size, fast sql disk size, slow sql memory size, and slow sql disk size. On the primary node, full sql indicates full SQL statements stored in an unlogged table, and slow sql indicates slow SQL statements. On the standby node, the non-slow SQL statements are called fast sql. Slow and fast SQL statements are stored in different locations. Therefore, four additional values are used for control.

  • fast sql memory size indicates the maximum memory space reserved for fast SQL statements. The value range is [16,1024], in MB.
  • fast sql disk size indicates the maximum disk space occupied by reserved fast SQL statements. The value range is [512,1048576], in MB.
  • slow sql memory size indicates the maximum memory space reserved for slow SQL statements. The value range is [16,1024], in MB.
  • slow sql disk size indicates the maximum disk space reserved for slow SQL statements. The value range is [512,1048576], in MB.

Note that the memory values corresponding to the fast and slow SQL statements cannot be greater than the disk value.

Data is cleared at a granularity of 16 MB. Therefore, a maximum of 16 MB data delay error may occur.

Default value: 32, 1024, 16, 512

Copyright © 2011-2024 www.enmotech.com All rights reserved.