Skip to content

Feature: :TIMING ON/OFF command for interactive sessions #622

@dlevy-msft-sql

Description

@dlevy-msft-sql

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions