You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release note (sql change): Automatic statistics collection can now be
enabled or disabled for individual tables, taking precedence over the
cluster setting, for example:
ALTER TABLE t1 SET (sql_stats_automatic_collection_enabled = true);
ALTER TABLE t1 SET (sql_stats_automatic_collection_enabled = false);
ALTER TABLE t1 RESET (sql_stats_automatic_collection_enabled);
RESET removes the setting value entirely, in which case the
similarly-name cluster setting, sql.stats.automatic_collection.enabled, is in effect for the table.
Cluster settings sql.stats.automatic_collection.fraction_stale_rows
and sql.stats.automatic_collection.min_stale_rows now also have table
setting counterparts:
The table settings may be set at table creation time, or later via ALTER
TABLE ... SET, independent of whether auto stats is enabled:
ALTER TABLE t1
SET (sql_stats_automatic_collection_fraction_stale_rows = 0.1,
sql_stats_automatic_collection_min_stale_rows = 2000);
CREATE TABLE t1 (a INT, b INT)
WITH (sql_stats_automatic_collection_enabled = true,
sql_stats_automatic_collection_min_stale_rows = 1000000,
sql_stats_automatic_collection_fraction_stale_rows= 0.05
);
The current table settings (storage parameters) are shown in the WITH
clause output of SHOW CREATE TABLE.
Note, any row mutations which have occurred a minute or two before
disabling auto stats collection via ALTER TABLE ... SET may trigger
stats collection, though DML submitted after the setting change will
not.
Exalate commented:
Related PR: cockroachdb/cockroach#78110
Commit: cockroachdb/cockroach@f9a102d
Release note (sql change): Automatic statistics collection can now be
enabled or disabled for individual tables, taking precedence over the
cluster setting, for example:
RESET removes the setting value entirely, in which case the
similarly-name cluster setting,
sql.stats.automatic_collection.enabled
, is in effect for the table.Cluster settings
sql.stats.automatic_collection.fraction_stale_rows
and
sql.stats.automatic_collection.min_stale_rows
now also have tablesetting counterparts:
The table settings may be set at table creation time, or later via ALTER
TABLE ... SET, independent of whether auto stats is enabled:
The current table settings (storage parameters) are shown in the
WITH
clause output of
SHOW CREATE TABLE
.Note, any row mutations which have occurred a minute or two before
disabling auto stats collection via
ALTER TABLE ... SET
may triggerstats collection, though DML submitted after the setting change will
not.
Jira Issue: DOC-3511
The text was updated successfully, but these errors were encountered: