Skip to content

Support EXPLAIN ANALYZE with creating unspecified partial stats #128904

@Uzair5162

Description

@Uzair5162

We require reqStats to have only 1 element in createPartialStatsPlan()

func (dsp *DistSQLPlanner) createPartialStatsPlan(

This works for CREATE STATISTICS <stat_name> FROM <table_name> USING EXTREMES where we don't specify a column since we plan and run create stats separately for each column in the default set. However, this doesn't support EXPLAIN ANALYZE CREATE STATISTICS <stat_name> FROM <table_name> USING EXTREMES and certain other EXPLAINS (such as EXPLAIN (VEC)) since we pass job details with all of the columns in the default column set together and expect a single plan:

plan, err = dsp.createPlanForCreateStats(

Jira issue: CRDB-41268

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-table-statsTable statistics (and their automatic refresh).C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions