-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
A-sql-table-statsTable statistics (and their automatic refresh).Table statistics (and their automatic refresh).C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Team
Description
When collecting partial stats on specified columns, we search for an index prefixed by that column in:
Line 227 in c64fb80
| func (n *scanNode) initDescSpecificCol(colCfg scanColumnsConfig, prefixCol catalog.Column) error { |
This doesn't work for hash-sharded indexes and REGIONAL BY ROW tables since partition keys prefix the indexes. We would also need to update bounds.ConstructUsingExtremesSpans() to build the correct spans to be scanned:
| func ConstructUsingExtremesSpans( |
We would also need to update how we select columns to collect partial stats on when unspecified by selecting the first column after the partition key.
Jira issue: CRDB-41160
Metadata
Metadata
Assignees
Labels
A-sql-table-statsTable statistics (and their automatic refresh).Table statistics (and their automatic refresh).C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries TeamSQL Queries Team
Type
Projects
Status
Backlog