Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the plan gist to crdb_internal.cluster_queries #76554

Closed
kevin-v-ngo opened this issue Feb 15, 2022 · 3 comments · Fixed by #88770
Closed

Add the plan gist to crdb_internal.cluster_queries #76554

kevin-v-ngo opened this issue Feb 15, 2022 · 3 comments · Fixed by #88770
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@kevin-v-ngo
Copy link

kevin-v-ngo commented Feb 15, 2022

We are introducing the plan gist to statement statistics to allow us to capture all plans of a statement fingerprint historically. We should add the plan gist as a column crdb_internal.cluster_queries for active statements. This will allow users to troubleshoot slow running or 'hung' queries for potential suboptimal or regressed plans in real-time.

Jira issue: CRDB-13176

@kevin-v-ngo kevin-v-ngo added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-observability labels Feb 15, 2022
@kevin-v-ngo kevin-v-ngo added this to Triage in Cluster Observability via automation Feb 15, 2022
@maryliag maryliag moved this from Triage to Up next in Cluster Observability Mar 7, 2022
@maryliag maryliag moved this from Up next to Active Issues in Cluster Observability Jul 4, 2022
@kevin-v-ngo
Copy link
Author

Once this is supported, we can add the EXPLAIN plan to active executions as well. Even more useful once we have recently executed executions.

@maryliag maryliag assigned xinhaoz and unassigned THardy98 Sep 23, 2022
craig bot pushed a commit that referenced this issue Sep 29, 2022
88770: server, sql: add plan gist to active queries r=xinhaoz a=xinhaoz

Closes #76554

This commit surfaces an executing query's plan gist. This information is added to the ListSessions response and the `crdb_internal.{node,cluster}_queries` tables. This field is only populated when the query enters the EXECUTING phase.

Release note (sql change): new column `plan_gist`
added to `crdb_internal.{node,cluster}_queries`
representing the compressed logical plan.

88815: kv: extend testing of supported follower read requests r=nvanbenschoten a=nvanbenschoten

Also demonstrate that Export requests cannot be served on followers, yet.

Release justification: testing only

89008: cloud/kubernetes: update version to v22.1.8 r=rhu713 a=rhu713



Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com>
Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
Co-authored-by: Rui Hu <rui@cockroachlabs.com>
@craig craig bot closed this as completed in 5615f11 Sep 29, 2022
Cluster Observability automation moved this from Active Issues to Done Sep 29, 2022
@kevin-v-ngo
Copy link
Author

Hi @xinhaoz, do we have an issue tracking adding the plan itself to active (and recently) executions?

@xinhaoz
Copy link
Member

xinhaoz commented Oct 20, 2022

server, sql: add plan gist to active queries #88770

If you mean adding it to the UI pages, it exists and it's been closed: #79128

xinhaoz added a commit to xinhaoz/cockroach that referenced this issue Oct 24, 2022
Closes cockroachdb#76554

This commit surfaces an executing query's plan gist.
This information is added to the ListSessions response
and the `crdb_internal.{node,cluster}_queries` tables.
This field is only populated when the query enters the
EXECUTING phase.

Release note (sql change): new column `plan_gist`
added to `crdb_internal.{node,cluster}_queries`
representing the compressed logical plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants