Print splits count and distribution time in EXPLAIN ANALYZE#25028
Merged
wendigo merged 1 commit intotrinodb:masterfrom Feb 16, 2025
Merged
Conversation
Contributor
|
@lukasz-stec can you show output before and after? |
Member
Author
Sure, added to the desciption |
wendigo
approved these changes
Feb 15, 2025
core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java
Outdated
Show resolved
Hide resolved
95953ac to
950628e
Compare
wendigo
reviewed
Feb 16, 2025
core/trino-main/src/main/java/io/trino/sql/planner/planprinter/PlanPrinter.java
Outdated
Show resolved
Hide resolved
Split distribution time can be a bottleneck in some scenarios. Having it in the EXPLAIN output makes it easier to diagnose without accessing query json. Split count is helpful to analyze query performance when there is either a big number of small splits or there is just one split like with basic JDBC connectors. The split count is visible also in the "Input rows distribution" metric but it is only available in the VERBOSE mode.
7c23d2b to
c23ae47
Compare
wendigo
approved these changes
Feb 16, 2025
Member
|
Where is splits count? |
Member
Author
For table scans only at the end of the input row: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Split distribution time can be a bottleneck in some scenarios. Having it in the explain makes it easier to diagnose without accessing query json. Split count is helpful to analyze query performance when there is either a big number of small splits or there is just one split like with basic jdbc connectors. Split count is visible also in the "Input rows distribution" metric but it is only available in the VERBOSE mode.
Sample output:
query
After (has
Total split distribution timeadded to the source stages and andSplitsadded to the table scans)Before