Summary
Add a :TIMING command to toggle performance timing display on/off during an interactive session.
Use Case
- Enable/disable timing without restarting sqlcmd
- Temporarily check performance for specific queries
- Better interactive debugging workflow
Proposed Syntax
:TIMING ON
SELECT * FROM users
GO
-- Shows timing info
:TIMING OFF
SELECT * FROM orders
GO
-- No timing info shown
Relationship to Existing Features
- Acts as a runtime toggle for what
-p flag enables at startup
- Complements
:PERFTRACE which redirects timing output to a file
-p flag would set initial state, :TIMING allows changing it
Implementation Notes
- Simple boolean toggle in the Sqlcmd struct
- Modify GO command to check the toggle state
- Minimal code change - leverages existing timing infrastructure
Summary
Add a
:TIMINGcommand to toggle performance timing display on/off during an interactive session.Use Case
Proposed Syntax
Relationship to Existing Features
-pflag enables at startup:PERFTRACEwhich redirects timing output to a file-pflag would set initial state,:TIMINGallows changing itImplementation Notes