Skip to content

sql: "canary release" for SQL table statistics #150015

@mgartner

Description

@mgartner

The optimizer relies heavily on SQL table stats to planning planning decisions. Consequently, plan regressions are more likely to occur when new stats are collected, e.g., when those stats are less representative of the actual data in the table.

To avoid plan regressions, we could follow the canary release pattern where new changes are released to a subset of users, and only promoted to the entire user base once deemed acceptable. For example, we could introduce the new stats for a subset of queries, and only promote the stats to be used by all queries once we have determined that there are no major regressions.

Thanks to @tbg for the inspiration here.

Jira issue: CRDB-52469

Epic CRDB-55121

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-optimizerSQL logical planning and optimizations.A-sql-table-statsTable statistics (and their automatic refresh).C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docsP-3Issues/test failures with no fix SLAT-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Short-term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions