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

webui: query fingerprinting and changes to plan or execution. #50284

Closed
awoods187 opened this issue Jun 16, 2020 · 2 comments
Closed

webui: query fingerprinting and changes to plan or execution. #50284

awoods187 opened this issue Jun 16, 2020 · 2 comments
Labels
A-sql-ui Why is my query slow? C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@awoods187
Copy link
Contributor

awoods187 commented Jun 16, 2020

In #50255 we introduced vectorized execution into the webui. In the example, I noticed that within the same query fingerprint we can present yes, no, or numerator/demoniator. For example, here is a 1/2:
image
This can be confusing to users because it doesn't explain why some queries are vectorized and some are not. Generalizing up a level, it won't be clear why the query fingerprint is sometimes faster and sometimes slower.

This has to do with the fact that we group queries based on fingerprinting. The same logical query (the same query fingerprint) could be run vectorized sometimes and sometimes not vectorized. For example this could be due to turning off the vectorized execution, lack of table statistics on the first run (this informs whether we use vectorized or not). This same methodology is also used to describe distributed execution. This begs the question, is it appropriate to group fingerprints if the execution changes?

What about if the plans change due to changing statistics?

Keeping the fingerprints grouped logically makes sense but it makes it hard to understand differences in query performance caused by changes in planning or execution. We should think about how to communicate this information.

Jira issue: CRDB-4138

@awoods187 awoods187 added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jun 16, 2020
@awoods187 awoods187 added the A-sql-ui Why is my query slow? label Jun 16, 2020
@RaduBerinde
Copy link
Member

I didn't know about this 1 of 2 feature. I tried to test things like this before but ran into #52788. Unfortunately, as of #52956, the server no longer returns separate instances of the stats for the same fingerprint depending on the vectorized status, so this likely doesn't work anymore on master. CC @dhartunian

@maryliag
Copy link
Contributor

For the same fingerprint we now show a list of plans used, with their respective values of vectorize, full scan, and stats.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-ui Why is my query slow? C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
None yet
Development

No branches or pull requests

4 participants