cockroachdb / cockroachdb/cockroach

opt: introduce limits to `Constraint.Combine`

Open
#112,454 1 comment 0 reactions 1 assignee Claimed by @DrewKimball View on GitHub
C-bug O-support P-3 T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We have a customer who [reported](https://github.com/cockroachlabs/support/issues/2622#issuecomment-1751365048) that certain queries are effectively stuck during planning. This is because `Constraint.Combine` can explore many thousands of combinations. It was partially addressed by fixing #111862, but we also should introduce some limits to amount of time (or combinations) we spend in that code path. This would improve planning time and can eliminate some OOMs too.

Jira issue: CRDB-32426

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.