microsoft / microsoft/go-sqlcmd

Feature: :TIMING ON/OFF command for interactive sessions

Open
#622 0 comments 0 reactions 0 assignees View on GitHub

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 -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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.