-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
enhancementNew feature or requestNew feature or request
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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request