dbgorilla

MIGRATION & QUERY REVIEW

Every schema change, checked against your real database first.

DBGorilla reads your migrations against your actual row counts, indexes and production statistics. When one takes a lock you can't afford, you find out before you merge, with the safe version and the rollback.

Start freeTest drive

Free forever · No credit card · 30 days of Pro included

2026_08_14_add_order_status.sql1 BLOCKER

PROPOSED

ALTER TABLE orders ADD COLUMN status text NOT NULL DEFAULT 'pending';

Rewrites the whole table under ACCESS EXCLUSIVE. Every read and write on orders blocks until it finishes.

ACCESS EXCLUSIVE · orders · 14,203,918 rows · est. 4m 12s at peak

SAFE ALTERNATIVE

-- 1. add the column nullable: metadata-only, no rewrite
ALTER TABLE orders ADD COLUMN status text;

-- 2. default applies to new rows only
ALTER TABLE orders ALTER COLUMN status SET DEFAULT 'pending';

-- 3. backfill in batches, off-peak, 10k at a time
UPDATE orders SET status = 'pending'
 WHERE status IS NULL AND id BETWEEN $1 AND $2;

-- 4. enforce without a full-table lock
ALTER TABLE orders ADD CONSTRAINT orders_status_present
  CHECK (status IS NOT NULL) NOT VALID;
ALTER TABLE orders VALIDATE CONSTRAINT orders_status_present;

ROLLBACK

ALTER TABLE orders DROP CONSTRAINT orders_status_present;
ALTER TABLE orders DROP COLUMN status;

A real review. The ad only had room for the top half.

Three commands and a connected database.

zsh · ~/acme-api
$ brew install dbgorilla/tap/dbgorilla
$ dbgorilla login
✓ signed in
$ dbgorilla collector install
✓ collector running

Collector runs in your network. Docker, Kubernetes, RDS/Aurora, Azure, GCP or native Postgres.

What you'll see in the first ten minutes.

01

Your slowest queries, ranked.

Read from your real pg_stat_statements and query plans, not a synthetic benchmark.

02

What changed, and why.

Plan regressions, lock risk on migrations, bloat and stale statistics: each with the cause, in English.

03

The fix, tested on a clone.

Every recommendation is validated against a production-shaped copy before it reaches you.

Start freeTest drive

Free forever · No credit card · 30 days of Pro included

“I just ran a benchmarked query with the indexes applied and 🤯 157x faster.”
CTO, no-code application platform

Your first 30 days are Pro.

  • 2,000 Gorilla Credits / month
  • Up to 10 hosts · 100 DBs / cluster
  • Full agent capabilities
  • 30-day retention
  • Regression detection & alerting
  • Index impact simulator
  • PR-CI bot & migration safety
  • Isolated DB clones to test changes safely

✓When the 30 days end, the free tier keeps working, free forever: one cluster, the EXPLAIN analyzer, schema linter, index suggestions, and the MCP server.

Point it at one database and see.

Start freeTest drive

Free forever · No credit card · 30 days of Pro included