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

sql: add the AOST timestamp to the output of EXPLAIN #99984

Closed
j82w opened this issue Mar 29, 2023 · 4 comments · Fixed by #125152
Closed

sql: add the AOST timestamp to the output of EXPLAIN #99984

j82w opened this issue Mar 29, 2023 · 4 comments · Fixed by #125152
Assignees
Labels
A-sql-explain Issues related to EXPLAIN and EXPLAIN ANALYZE improvements C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-quick-win Likely to be a quick win for someone experienced. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team
Projects

Comments

@j82w
Copy link
Contributor

j82w commented Mar 29, 2023

The AOST can make a big impact on the performance of a query. It should be included in the explain to avoid confusion.

Jira issue: CRDB-26164
Epic CRDB-37757

@j82w j82w added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team labels Mar 29, 2023
@blathers-crl blathers-crl bot added this to Triage in SQL Queries Mar 29, 2023
@knz knz changed the title Explain: Add AOST(AS OF SYSTEM TIME) sql: add the AOST timestamp to the output of EXPLAIN Mar 29, 2023
@knz
Copy link
Contributor

knz commented Mar 29, 2023

cc @yuzefovich for triage

@mgartner mgartner moved this from Triage to New Backlog in SQL Queries Mar 30, 2023
@mgartner
Copy link
Collaborator

Scans could show that they perform a follow-read.

@knz
Copy link
Contributor

knz commented Mar 30, 2023

@mgartner where?

demo@127.0.0.1:26257/movr> explain select * from users as of system time '-10s';
            info
-----------------------------
  distribution: local
  vectorized: true

  • scan
    missing stats
    table: users@users_pkey
    spans: FULL SCAN
(7 rows)

I don't see the follow-read there.

@mgartner
Copy link
Collaborator

Sorry, I didn't mean that we already show this information, just that we could add it. I think this is more valuable than showing whether or not AOST was used in the query - that's evident in the query itself - and the performance impact is mostly dependent on whether or not a follower read was used, not necessarily whether or not AOST was used, IIUC.

@michae2 michae2 added O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs E-quick-win Likely to be a quick win for someone experienced. P-3 Issues/test failures with no fix SLA labels Nov 21, 2023
@michae2 michae2 added the A-sql-explain Issues related to EXPLAIN and EXPLAIN ANALYZE improvements label Nov 29, 2023
@yuzefovich yuzefovich self-assigned this Jun 5, 2024
@craig craig bot closed this as completed in 41c37cb Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-explain Issues related to EXPLAIN and EXPLAIN ANALYZE improvements C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) E-quick-win Likely to be a quick win for someone experienced. O-support Would prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team
Projects
Status: Done
SQL Queries
New Backlog
Development

Successfully merging a pull request may close this issue.

5 participants