Two ways to watch Postgres:
APM: in-process, per-host pricing, request-to-query correlation.
DB-side agent: read-only, per-DB pricing, stats-view depth.
10 services + 3 DBs:
APM ~$510/mo vs DB agent ~$87/mo.
Match the tool to the job.
https://t.co/tL5qJqSpJo
pg_stat_activity at 1 Hz catches 1.5% of 15 ms queries.
10K queries/min → you see ~150. The other 9,850 flow through invisibly.
This is why activity dashboards feel empty while CPU spikes.
Fix: 10 Hz sampling + pg_stat_statements deltas.
https://t.co/HbArxicocM
Datadog DBM doesn't cover ClickHouse.
It covers Postgres, MySQL, MongoDB, SQL Server. For CH you get the generic infra integration at $23/host and nothing MergeTree-aware.
Where each CH monitoring tool actually lands:
https://t.co/TSMIcGsBKI
Three ways to audit every DML in Postgres:
- pgaudit: 1-5% overhead, no request correlation
- Triggers: ~2x WAL, break on schema changes
- Logical decoding + Debezium: abandoned slots fill disk
Pick on tradeoffs, not defaults.
https://t.co/hNqNCVnn8E
1 billion audit rows in ClickHouse: ~200 GB compressed, a few dollars a month.
Same data in Postgres: heap bloat, VACUUM pressure, per-GB managed storage 10-20x more.
MergeTree was built for exactly this.
https://t.co/Una9bmXXzb
@brankopetric00 Good follow-up: check pg_stat_user_indexes a week later and confirm idx_scan > 0. Planner doesn't always pick new indexes, especially if ANALYZE hasn't run or row estimates are off. Indexes the planner ignores are pure write overhead with zero read benefit.
Same PostgreSQL performance issues show up over and over:
- Missing indexes
- N+1 queries
- Wrong column order in composite indexes
- Long transactions holding locks
- Autovacuum falling behind, bloat builds up
10 patterns, how to spot and fix each:
https://t.co/0rJwjvF4fo
@chronark MergeTree with ORDER BY (actor_id, event_time) gets you cheap "what did this user do" lookups. Partition by toYYYYMM(event_time), LowCardinality for action/target_type enums, full payload as String with ZSTD, TTL for retention.
@jnunemaker Nice. When only a few hot tables do this, per-table ALTER TABLE ... SET (autovacuum_vacuum_scale_factor = 0.02) tends to be better than tightening globally, so quiet tables aren't touched more than they need. pg_visibility also lets you inspect the VM directly.
pg_stat_statements is the foundation of PostgreSQL query monitoring. Three ways teams get it wrong:
1. Missing from shared_preload_libraries (needs restart)
2. CREATE EXTENSION in one DB, not every DB
3. Reading cumulative counters as point-in-time
https://t.co/6SmMyf706e
Datadog DBM: $93/host/month (requires infra monitoring as prereq).
Basira: $29/database/month.
At 100 databases: $9,300 vs $2,900.
Datadog for APM correlation. Basira for cost, ClickHouse, and API-first setup.
https://t.co/9nszdGxMYB
"Too many parts (301)" is ClickHouse's self-protection when inserts outpace merges. Hit the 300-part threshold and your writes start failing.
Fix: batch inserts to 10k-100k rows, or turn on async_inserts on 22.8+.
https://t.co/z7wKmyzJan
Cursor and Claude Code provision databases now. They expect monitoring to install the same way, via API.
Most DB monitoring tools still need a human clicking through a wizard. Basira's entire lifecycle is four curl calls.
https://t.co/1fHlSxYf3H
Try finding a monitoring tool that gets ClickHouse. PostgreSQL has dozens of options. ClickHouse? You're rolling your own Grafana dashboards on system tables or using an APM that just checks if the process is up. https://t.co/tJKjssYXHm
a 4-vCPU RDS instance is $36/month. Just for monitoring. The bill spikes with your traffic, right when you're trying to figure out what went wrong. https://t.co/swRkkaBZp5