cockroachdb / cockroachdb/cockroach

sql: add query plan cache hit / miss to explain

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

Description

It would be nice to somehow expose whether query planning hit the query cache or not, so that users can make sure they are hitting the cache in more cases. Maybe this could be shown as one of the top-level measurements during `EXPLAIN ANALYZE` or `EXPLAIN (VERBOSE)`.

Jira issue: CRDB-32428

Contributor guide

Open the contributing guide

Research direction

Start by tracing the EXPLAIN ANALYZE and EXPLAIN (VERBOSE) entry points alongside query-planning cache behavior. Decide how a cache hit or miss should appear as a top-level measurement, then verify that the output lets users distinguish cached from uncached planning.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.