Query Statistics
Pro feature — requires an active Pro or Early Access license. Get Early Access free →
Query Statistics aggregates execution data across every query you run, normalized by pattern, so you can identify slow queries, frequent callers, and error-prone statements.
How It Works
Every query execution is captured and stored in a ring buffer (up to 5,000 entries per session). Older entries are dropped as the buffer fills. Query text is normalized by stripping literal values — WHERE id = 1 and WHERE id = 42 are treated as the same pattern.
Opening the Panel
Click the Query Stats tab in the bottom panel bar.
📸 Screenshot needed: The Query Statistics panel showing the Top Impact tab with a list of normalized query patterns, their Total / Avg / P95 times, and call counts.
Views
Top Impact
Queries ranked by total execution time across all runs. Identifies which patterns account for the most cumulative time in your session.
Top Frequent
Queries ranked by call count. Shows which patterns you run most often.
Error Rate
Queries ranked by error percentage. Useful for finding patterns that frequently fail.
Metrics per Pattern
| Metric | Description |
|---|---|
| Call count | Total times this pattern ran |
| Total time | Sum of all execution durations |
| Avg time | Mean execution duration |
| P95 time | 95th-percentile latency |
| Error count | Total failed executions |
| Error rate | Errors as a percentage of total calls |
Hourly Trend
The detail view for any pattern shows an hourly execution chart — a sparkline covering the last 24 hours, grouped into 1-hour buckets.
📸 Screenshot needed: Pattern detail view with the hourly sparkline chart visible.
Filtering
The panel can be filtered by:
- Connection — show stats for one environment only
- Time window — last hour, last 24 hours, current session
Clearing Stats
Stats are held in memory and reset when you restart Zentro. To clear them mid-session without restarting, click Clear in the panel header.