-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 estimated and actual statistics to telemetry logging #85169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 11 of 11 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @kevin-v-ngo, @michae2, and @vy-ton)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Excited to see the insights we're going to pull from this.
@@ -2465,6 +2465,13 @@ contains common SQL event/execution details. | |||
| `TransactionID` | Transaction ID of the query. | no | | |||
| `DatabaseID` | Database ID of the query. | no | | |||
| `StatementFingerprintID` | Statement fingerprint ID of the query. | no | | |||
| `MaxFullScanRowsEstimate` | Maximum number of rows scanned by a full scan, as estimated by the optimizer. | no | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the maximum full scan over both full index and full table scans correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTRs!
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @kevin-v-ngo, @michae2, and @vy-ton)
docs/generated/eventlog.md
line 2468 at r1 (raw file):
Previously, kevin-v-ngo wrote…
This is the maximum full scan over both full index and full table scans correct?
Yep, that's correct
This commit adds several new fields to the SampledQuery structure used for telemetry logging. Closes cockroachdb#71666 Release note (sql change): The structured payloads used for telemetry logs now include the following new fields: MaxFullScanRowsEstimate: Maximum number of rows scanned by a full scan, as estimated by the optimizer. TotalScanRowsEstimate: Total number of rows read by all scans in the query, as estimated by the optimizer. OutputRowsEstimate: The number of rows output by the query, as estimated by the optimizer. StatsAvailable: Whether table statistics were available to the optimizer when planning the query. NanosSinceStatsCollected: The maximum number of nanoseconds that have passed since stats were collected on any table scanned by this query. BytesRead: The number of bytes read from disk. RowsRead: The number of rows read from disk. RowsWritten: The number of rows written.
bors r+ |
Build failed (retrying...): |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from e1f2459 to blathers/backport-release-22.1-85169: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
This commit adds several new fields to the
SampledQuery
structure used fortelemetry logging.
Closes #71666
Release note (sql change): The structured payloads used for telemetry
logs now include the following new fields:
MaxFullScanRowsEstimate: Maximum number of rows scanned by a full scan,
as estimated by the optimizer.
TotalScanRowsEstimate: Total number of rows read by all scans in the query,
as estimated by the optimizer.
OutputRowsEstimate: The number of rows output by the query, as estimated
by the optimizer.
StatsAvailable: Whether table statistics were available to the optimizer
when planning the query.
NanosSinceStatsCollected: The maximum number of nanoseconds that have
passed since stats were collected on any table scanned by this query.
BytesRead: The number of bytes read from disk.
RowsRead: The number of rows read from disk.
RowsWritten: The number of rows written.