release-26.2: sql: show table stats rollout mode in EXPLAIN and EXPLAIN ANALYZE#166129
Conversation
When the canary stats experiment is active (sql.stats.canary_fraction > 0),
EXPLAIN and EXPLAIN ANALYZE now emit a "table stats mode" field indicating
whether the plan was built using "canary" (newest) or "stable"
(second-newest) table statistics. The field is omitted when the
experiment is off.
Individual scan nodes also show the table's canary window duration
("canary window: <duration>") when the table has divergent canary vs.
stable statistics. This is a table-level property indicating the table
participates in the experiment; the query-level "table stats mode"
field indicates which stats path was actually used.
Part of: #156817
Release note (sql change): EXPLAIN and EXPLAIN ANALYZE now display
a "table stats mode" field ("canary" or "stable") when the canary
statistics rollout experiment is active, indicating which table
statistics were used for query planning. Scan nodes for tables with
active canary stats also show the configured canary window duration.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
|
This backport targets 26.2, which is an End-of-Life (EOL) version. Please verify that backporting to this EOL version is intentional and appropriate. EOL versions no longer receive maintenance updates according to our support policy. Thanks for opening a backport. Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate. |
mw5h
left a comment
There was a problem hiding this comment.
@mw5h reviewed 13 files and all commit messages, and made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on michae2, yuzefovich, and ZhouXing19).
Backport 1/1 commits from #165981 on behalf of @ZhouXing19.
When the canary stats experiment is active (
sql.stats.canary_fraction > 0),EXPLAINandEXPLAIN ANALYZEnow emit a "table stats mode" field indicatingwhether the plan was built using "canary" (newest) or "stable"
(second-newest) table statistics. The field is omitted when the
experiment is off (i.e.
sql.stats.canary_fraction == 0).Individual scan nodes also show the table's canary window duration
(
canary window: <duration>) when the table has divergent canary vs.stable statistics. This is a table-level property indicating the table
participates in the experiment; the query-level
table stats modefield indicates which stats path was actually used.
Part of: #156817
Release note (sql change): EXPLAIN and EXPLAIN ANALYZE now display
a "table stats mode" field ("canary" or "stable") when the canary
statistics rollout experiment is active, indicating which table
statistics were used for query planning. Scan nodes for tables with
active canary stats also show the configured canary window duration.
Co-Authored-By: roachdev-claude roachdev-claude-bot@cockroachlabs.com
Release justification: important observability part of a feature that is asked by the customer.