Database Monitoring
Monitor PostgreSQL database performance and health
Active Connections
290
Queries/sec
7,704
Avg Query Time
3.7ms
Storage Used
385.1 GB
Primary PostgreSQL
db-primary.wrnexus.local:5432
Connections
45 / 200
Storage
129 / 500 GB
QPS
1,247
Avg Time
3.2ms
Rep Lag
0s
POSTGRESQL 15.4 primary
99.99% uptime Read Replica 1
db-replica-1.wrnexus.local:5432
Connections
89 / 200
Storage
128 / 500 GB
QPS
3,567
Avg Time
2.1ms
Rep Lag
0.5s
POSTGRESQL 15.4 replica
99.98% uptime Read Replica 2
db-replica-2.wrnexus.local:5432
Connections
156 / 200
Storage
128 / 500 GB
QPS
2,890
Avg Time
5.8ms
Rep Lag
2.3s
POSTGRESQL 15.4 replica
99.85% uptime Slow Queries
Queries exceeding 1 second threshold
sms_db Jan 15, 04:57 PM
SELECT * FROM messages m JOIN contacts c ON m.contact_id = c.id WHERE m.created_at > $1 ORDER BY m.created_at DESC LIMIT 1000 4.52s max 3.85s avg 156 calls
email_db Jan 15, 04:52 PM
UPDATE campaigns SET status = $1, updated_at = NOW() WHERE id IN (SELECT id FROM campaigns WHERE scheduled_at < NOW() AND status = 'pending') 2.34s max 1.96s avg 89 calls
admin_db Jan 15, 05:00 PM
SELECT COUNT(*) FROM audit_logs WHERE created_at BETWEEN $1 AND $2 GROUP BY user_id, action 1.88s max 1.65s avg 234 calls
auth_db Jan 15, 04:02 PM
DELETE FROM session_tokens WHERE expires_at < NOW() - INTERVAL '7 days' 1.23s max 1.19s avg 12 calls
Table Statistics
Top tables by size
| Table | Rows | Size | Index | Last Vacuum |
|---|---|---|---|---|
messages | 45,678,234 | 42.3 GB | 8.7 GB | Jan 15, 04:02 PM |
contacts | 2,345,678 | 1.8 GB | 456 MB | Jan 15, 03:02 PM |
campaigns | 123,456 | 234 MB | 89 MB | Jan 15, 04:32 PM |
audit_logs | 89,012,345 | 67.8 GB | 12.3 GB | Jan 15, 01:02 PM |
users | 156,789 | 45 MB | 12 MB | Jan 15, 04:47 PM |
Connection Pool Status
Real-time connection pool monitoring
Active
Idle
Available
Primary PostgreSQL
57 / 200
28%
Read Replica 1
97 / 200
49%
Read Replica 2
158 / 200
79%
Active Queries
Currently executing queries
| PID | Database | User | Query | Duration | State | Action |
|---|---|---|---|---|---|---|
| 12847 | sms_db | app_user | SELECT * FROM messages WHERE... | 2.3s | active | |
| 12891 | email_db | app_user | INSERT INTO campaign_logs... | 0.4s | active | |
| 12903 | admin_db | admin_user | UPDATE users SET last_login... | 0.1s | idle in txn |