Feature: Per-statement timing with -p flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- cli, performance
Research direction
Start by tracing the existing -p timing path and the timing infrastructure used for :PERFTRACE, then identify where individual statements in a batch are executed. Done means the selected timing mode reports each statement's execution time while preserving the batch total and existing output.
Written by the indexing model from the issue text.
Description
Summary
Add per-statement timing information when using the -p flag, showing execution time for each individual statement in a batch rather than just the batch total.
Use Case
- Identify slow queries within multi-statement batches
- Performance tuning and optimization
- Query profiling during development
Current Behavior
With -p flag, only the total batch execution time is shown:
Network packet size (bytes): 4096
1 xact(s):
Clock Time (ms.): total 150
Proposed Behavior
Show timing for each statement within a batch:
-- Statement 1: SELECT * FROM users
Clock Time (ms.): 45
-- Statement 2: SELECT * FROM orders
Clock Time (ms.): 105
Network packet size (bytes): 4096
2 xact(s):
Clock Time (ms.): total 150
Implementation Notes
- Track timing at the statement level, not just batch level
- Consider making this an optional enhancement to -p (e.g.,
-p2for verbose timing) - Leverage existing timing infrastructure used for :PERFTRACE
- Dominant language
- Go
- Stars
- 595
- Forks
- 91
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
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.
More from microsoft/go-sqlcmd
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
All issues in microsoft/go-sqlcmd
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JakeChampion/lang#10213 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100