cockroachdb / cockroachdb/cockroach
sql: write a test to compare query plans of prepared and simple statements
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
We've seen a number of cases where query plans are significantly different between prepared and simple versions of the same query, even when generic query plans are not used. This is unexpected for users and represents a bit of a UX papercut. Ideally, we'd get the same good plan whether or not a query is prepared with placeholders of just using the simple protocol with all placeholders filled in. We should consider building a randomized test that compares the query plan of prepared and simple queries, which fails if the plans are significantly different (e.g., one plan has a full table scan and the other one doesn't).
Jira issue: CRDB-60187
Contributor guide
Assessment
This issue has not been assessed yet.