Built on pg_stat_statements and PostgreSQL system views. Every metric that matters for understanding and optimizing your PostgreSQL database.
Query Performance
Basira tracks every query via pg_stat_statements and surfaces the ones that matter most: the slowest, the most frequent, and the ones consuming the most resources.
Mean, p95, and max execution times for every normalized query. Spot outliers instantly.
Know how often each query runs. A 10ms query called 100k times/hour costs more than a 500ms query called once.
Shared buffer hits, reads, and temp file usage per query to understand I/O impact.
See how query performance changes over time. Catch regressions from deploys before users notice.
Active Query Monitoring
A live view of every active query, connection, and lock in your database. Real-time WebSocket streaming with automatic reconnection.
Every currently executing query, how long it's been running, which user initiated it, and its current state.
Hierarchical view of which queries hold locks and which are blocked. Resolve deadlocks without guessing.
What your database is waiting on (I/O, locks, network, CPU) broken down per query and connection.
Automatically flag queries that exceed configurable duration thresholds.
Table & Index Analytics
Tables and indexes look fine in your migration files. Basira shows you how they actually perform under load.
See which tables are being scanned sequentially when they shouldn't be. Identify tables that need better indexing.
Find unused indexes wasting disk space and write throughput. See which indexes are pulling their weight.
Track how much of each table is dead space. Know when VACUUM isn't keeping up with your write rate.
Monitor write patterns per table. Understand which tables are write-hot and may need partitioning.
Wait Events & Checkpoints
Aggregate wait event data and checkpoint metrics to understand system-level bottlenecks.
Last-hour aggregated view of all PostgreSQL wait events. Identify whether your bottleneck is I/O, locks, or CPU.
Track bgwriter and checkpoint performance: buffers written, sync times, and checkpoint frequency.
PostgreSQL I/O stats broken down by operation type. Understand read/write patterns at the system level.
Replication
Monitor replication health so you catch lag before it becomes a user-facing issue.
Track WAL lag, slot status, and replay position for each replica.
See when replicas fall behind so you can act before read queries return stale data.
Basira vs. DIY
A common approach is to scrape pg_stat_statements into Prometheus and build Grafana dashboards on top. It works — until dashboard maintenance, alert tuning, and wait-event analysis eat the afternoon you meant to spend on the product.
| Self-hosted Prometheus + Grafana | Basira | |
|---|---|---|
| Setup time | Days to weeks — exporter config, Prometheus scraping, dashboard authoring | ~5 minutes — Helm install, read-only role, done |
| Query fingerprinting | Raw queryid — you normalize and group | Automatic — grouped, deduplicated, and sortable |
| Active queries + lock tree | Possible but requires custom pg_stat_activity + pg_locks queries and a live view | Built in — live WebSocket view with lock dependency graph |
| Table bloat tracking | Requires bespoke bloat-estimation SQL or pgstattuple | Out of the box, with per-table trend lines |
| Alert authoring | You write PromQL rules and tune thresholds from scratch | Built-in database-aware alerts with sensible defaults |
| Version upgrades | You maintain exporters and dashboards as Postgres and Prometheus evolve | Agent is updated centrally — dashboards keep working |
| ClickHouse in the same view | Separate exporters, separate dashboards | Unified — one tool, one price, every engine |
Rolling your own makes sense when Prometheus is already your metrics backbone and you have time to invest. For everyone else, Basira gets you production-grade PostgreSQL observability without the dashboard-maintenance tax. See our guide to setting up pg_stat_statements for the foundation either approach builds on.
Agent Setup
A lightweight Go binary deployed via Helm. Minimal setup, no superuser access, no complex configuration.
The agent connects with a read-only PostgreSQL role. It never modifies your data or schema.
Basira runs without it, but enabling pg_stat_statements is recommended for full PostgreSQL query analytics.
Single binary, ~20MB memory. Polls at configurable intervals. Designed to be invisible on your server.
Up and running in under 5 minutes. No credit card required.
Start Free Trial