Appearance
ybd_analyze_after_writes (boolean)
Analyze operations are used to keep statistics up to date, as described in Auto-Analyzing Tables.
If your workload requires frequent small INSERT INTO...SELECT operations into a large fact table and you want to optimize performance, you can disable the immediate ANALYZE operations that happen after each INSERT. To disable these ANALYZE operations, set this configuration parameter to OFF
. This parameter defaults to ON
.
For example, to set the parameter for a role performing large data loads:
sql
create role insert_select;
alter role insert_select set ybd_analyze_after_writes to off;
After a configuration reload, immediate ANALYZE operations will be disabled for all sessions run when the insert_select
user runs INSERT INTO...SELECT operations. The advantage to disabling the parameter in this way is that it will remain enabled for other write operations. Setting it at a system level is discouraged since it can cause statistics to drift resulting in bad query plans.
After changing this parameter, you have to reload the system configuration (or restart the database) before the new behavior takes effect.
See also ybd_analyze_after_loads
.