Features
Query Statistics

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

MetricDescription
Call countTotal times this pattern ran
Total timeSum of all execution durations
Avg timeMean execution duration
P95 time95th-percentile latency
Error countTotal failed executions
Error rateErrors 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.