microsoft / microsoft/go-sqlcmd
Feature: :TIMING ON/OFF command for interactive sessions
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Go
- Stars
- 595
- Forks
- 91
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
Description
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
-pflag enables at startup - Complements
:PERFTRACEwhich redirects timing output to a file -pflag would set initial state,:TIMINGallows 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Sqlcmd struct, the existing -p timing setup, the GO command handling, and the :PERFTRACE implementation. Trace how timing is currently displayed, then add the interactive toggle so ON and OFF control subsequent queries without changing the startup behavior; verify both states in an interactive session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100