Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto analyze service tserver and master flags #25097

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
10 changes: 10 additions & 0 deletions docs/content/preview/reference/configuration/yb-master.md
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,16 @@ expensive when the number of yb-tservers, or the number of databases goes up.

{{< /note >}}

## Auto Analyze Service flags

Auto Analyze service flags are {{<tags/feature/tp>}}.
yifanguan marked this conversation as resolved.
Show resolved Hide resolved

yifanguan marked this conversation as resolved.
Show resolved Hide resolved
##### ysql_enable_auto_analyze_service

Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
ddhodge marked this conversation as resolved.
Show resolved Hide resolved

Default: false

## Advanced flags

##### --allowed_preview_flags_csv
Expand Down
46 changes: 46 additions & 0 deletions docs/content/preview/reference/configuration/yb-tserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,52 @@ After a DDL statement that includes updating DocDB system catalog completes, YB-
When the flag `ysql_ddl_transaction_wait_for_ddl_verification` is enabled, YSQL waits for any YB-Master background operations to finish before returning control to the user.
{{< /note >}}

## Auto Analyze Service flags

Auto Analyze service flags are {{<tags/feature/tp>}}.
yifanguan marked this conversation as resolved.
Show resolved Hide resolved

yifanguan marked this conversation as resolved.
Show resolved Hide resolved
##### ysql_enable_auto_analyze_service

Enable the Auto Analyze service which automatically runs ANALYZEs to update table statistics for tables which have changed more than a configurable threshold.
ddhodge marked this conversation as resolved.
Show resolved Hide resolved

Default: false

##### ysql_enable_table_mutation_counter
Enable counting of mutations on a per-table basis. These mutations are used to automatically run ANALYZE as soon as the mutations of a table cross
ddhodge marked this conversation as resolved.
Show resolved Hide resolved
a certain threshold (decided based on [ysql_auto_analyze_threshold](#ysql-auto-analyze-threshold) and [ysql_auto_analyze_scale_factor](#ysql-auto-analyze-scale-factor)).
ddhodge marked this conversation as resolved.
Show resolved Hide resolved

Default: false

##### ysql_auto_analyze_threshold

The minimum number of mutations needed to run ANALYZE on a table.

Default: 50

##### ysql_auto_analyze_scale_factor

A fraction of the table size to add to ysql_auto_analyze_threshold when deciding whether to run ANALYZE.
yifanguan marked this conversation as resolved.
Show resolved Hide resolved

Default: 0.1

##### ysql_auto_analyze_batch_size

The max number of tables the auto analyze service tries to analyze in a single ANALYZE statement.
ddhodge marked this conversation as resolved.
Show resolved Hide resolved

Default: 10

##### ysql_cluster_level_mutation_persist_interval_ms

Interval at which the reported node level table mutation counts are persisted to the underlying YCQL table by the auto analyze service.
yifanguan marked this conversation as resolved.
Show resolved Hide resolved

Default: 10000

##### ysql_cluster_level_mutation_persist_rpc_timeout_ms

Timeout for rpcs involved in persisting mutations in the auto-analyze table.
yifanguan marked this conversation as resolved.
Show resolved Hide resolved

Default: 10000

## Advanced flags

##### backfill_index_client_rpc_timeout_ms
Expand Down