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

distsqlrun: include StartScan stall time in EXPLAIN ANALYZE #38329

Merged
merged 1 commit into from
Jun 21, 2019
Merged

distsqlrun: include StartScan stall time in EXPLAIN ANALYZE #38329

merged 1 commit into from
Jun 21, 2019

Conversation

asubiotto
Copy link
Contributor

We previously assumed that StartScan was a once-per-query operation so
would not include time spent there in total stall time.

However, that is not the case for lookup joins, where the bulk of the
work is performed in StartScan once per batch.

Release note: None

cc @jordanlewis

@asubiotto asubiotto requested review from yuzefovich and a team June 20, 2019 19:51
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 6 of 6 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)


pkg/sql/distsqlrun/stats.go, line 138 at r1 (raw file):

}

// Next() calls NextRow() on the underlying Fetcher. If the returned

[nit]: I'd adjust the wording of the second sentence since in ProducerMetadata only a single field can be set. I'd say something like "If an error is encountered, it is returned via a ProducerMetadata."

We previously assumed that StartScan was a once-per-query operation so
would not include time spent there in total stall time.

However, that is not the case for lookup joins, where the bulk of the
work is performed in StartScan once per batch.

Release note: None
Copy link
Contributor Author

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)


pkg/sql/distsqlrun/stats.go, line 138 at r1 (raw file):

Previously, yuzefovich wrote…

[nit]: I'd adjust the wording of the second sentence since in ProducerMetadata only a single field can be set. I'd say something like "If an error is encountered, it is returned via a ProducerMetadata."

Done.

@asubiotto
Copy link
Contributor Author

bors r=yuzefovich

craig bot pushed a commit that referenced this pull request Jun 21, 2019
38329: distsqlrun: include StartScan stall time in EXPLAIN ANALYZE r=yuzefovich a=asubiotto

We previously assumed that StartScan was a once-per-query operation so
would not include time spent there in total stall time.

However, that is not the case for lookup joins, where the bulk of the
work is performed in StartScan once per batch.

Release note: None

cc @jordanlewis 

Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Jun 21, 2019

Build succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants