INSERT,
UPDATE, DELETE,
SELECT INTO, or COPY operations #
The online_analyze module provides a set of
features that immediately update statistics after INSERT,
UPDATE, DELETE,
SELECT INTO, or COPY operations for
the affected tables.
It is not recommended to use this module with modern versions of 1C.
However, you can enable online_analyze if background
updates do not provide the desired result or if the optimizer frequently
fails to estimate the row count.
The instruction below is relevant only if you decide to use the module.
To use online_analyze module, load the shared library:
LOAD 'online_analyze';
You can configure online_analyze using
the following custom variables (default values are shown):
online_analyze.enable = on
Enables online_analyze.
online_analyze.verbose = on
Executes ANALYZE VERBOSE.
Since verbose is a reserved SQL key word, this
parameter has to be double-quoted when used in SQL queries. For example:
ALTER SYSTEM SET "online_analyze.verbose" = 'off';
online_analyze.scale_factor = 0.1
Fraction of table size to start online analysis (similar to autovacuum_analyze_scale_factor).
online_analyze.threshold = 50
Minimum number of row updates before starting online analysis (similar to autovacuum_analyze_threshold).
online_analyze.min_interval = 10000
Minimum time interval between ANALYZE
calls per table, in milliseconds.
online_analyze.table_type = "all"
Type(s) of tables for online analysis. Possible values are:
all, persistent,
temporary, none.
online_analyze.exclude_tables = ""
List of tables to exclude from online analysis.
online_analyze.include_tables = ""
List of tables to include in online analysis
(online_analyze.include_tables overrides
online_analyze.exclude_tables).
online_analyze.local_tracking = off
Enables per-backend tracking for temporary tables by
online_analyze. When this variable is set
to off, online_analyze
uses the default system statistics for temporary tables.
online_analyze.lower_limit = 0
Minimum number of rows in a table required to trigger
online_analyze.
online_analyze.capacity_threshold = 100000
Maximum number of temporary tables to store in local cache.
Teodor Sigaev <teodor@sigaev.ru>