cockroachdb / cockroachdb/cockroach

opt: consider partial indexes for workload index recommendations

Open
#143,426 0 comments 0 reactions 0 assignees View on GitHub
A-partial-indexes C-enhancement T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**
The index recommendation engine currently does not recommend partial indexes, since it's not clear what predicates should be considered for the index predicate. However, when creating workload index recommendations, we have access to historical queries, so we could see which predicates are used frequently.

**Describe the solution you'd like**
The workload index recommendation engine should identify predicates in the historical queries that were not parameterized and also used regularly. These predicates should be considered for partial index candidates.

**Additional context**
Related slack thread: https://cockroachlabs.slack.com/archives/C01RX2G8LT1/p1742836553047329

Jira issue: CRDB-48828

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.