cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.12k stars 3.81k forks source link

sql: label generic query plans in statement fingerprints > explain plans pages #128807

Open mgartner opened 3 months ago

mgartner commented 3 months ago

When generic query plans are enabled with SET plan_cache_mode=auto, the "Explain Plans" page in the console will often show two plans:

image

One of the plans is the custom plan and the other is the generic plan. Because plan_cache_mode=auto will try at least 5 custom plans per query per session before attempting to use a generic plan, this pattern of having two plans will be common.

To make it easier to understand that one of the plans is generic and one is custom, we should explicitly label the plans by adding a "Generic" column.

Jira issue: CRDB-41218

mgartner commented 1 month ago

@dhartunian we think this would help users better understand the difference between plans in the statements page. I'm happy to help out, but would need someone with more experience with the UI to lend a hand. LMK if anyone on your team has the bandwidth in the next few weeks.

mgartner commented 6 days ago

This is a nice-to-have, so I've downgraded to P-3.