Repository navigation
Conversation
ggevay
force-pushed
the
gabor/console-execution-time
branch
from
October 5, 2026 21:56
35d3267 to
259eb7d
Compare
The SQL Shell opts in to the `emit_execution_time_notice` session variable when it connects. It stores the `MZ012` execution time notice on the result it describes, and shows that time next to the round trip measured in the browser, labeled by kind and execution strategy. Environments that do not know the variable answer with a startup notice, which the Shell hides, and keep showing the round trip alone. Part of CNS-170. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ggevay
force-pushed
the
gabor/console-execution-time
branch
from
October 12, 2026 11:53
259eb7d to
1ac1395
Compare
This branch has not been deployed
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.
Draft, 100% Claude
Motivation
Part of CNS-170. The SQL Shell shows "Returned in X", a round trip measured in the browser. On a slow network, a query served from an index looks as slow as one that runs a dataflow. Materialize can report its own execution time per statement (the
emit_execution_time_noticesession variable, separate PR). The Shell now shows it next to the round trip.Description
emit_execution_time_notice=onwhen it connects.MZ012is stored as the result's execution time instead of being listed with the result's notices.CommandComplete, so it lands on the statement it describes.MZ012notice the Shell cannot parse, for example of a kind added later, is dropped, which leaves the round trip alone.Returned in 148.0ms · 12.0ms to first row (served from an index).<0.1ms.sql-shell.mdgains a "Query timing" section.User-visible effect: below each result, the SQL Shell shows Materialize's own execution time next to the round trip, on environments that report it.
Verification
executionTime.test.ts(new): parsing, every kind's label, unknown strategies, sub-0.1 ms times, and the filter for a failed startup setting.webSocketFsm.test.ts: anMZ012notice becomes the latest result's execution time and is not listed as a notice. AnMZ012notice whose detail does not parse is dropped.🤖 Generated with Claude Code