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.

Get started free

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.

Two commands and a login.

zsh · ~/acme-api
$ brew install dbgorilla/tap/dbgorilla
$ dbgorilla login
signed in
$ dbgorilla doctor
api auth mcp key cursor vs code

Collector runs in your network. Docker, Kubernetes, RDS/Aurora 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.

Get started free

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

What “free forever” means here.

  • 1 cluster, single host
  • EXPLAIN plan analyzer
  • 50 Gorilla Credits a month
  • Schema linter
  • One-shot index suggestions
  • 7-day retention
  • MCP server (Claude Code, Cursor, VS Code)
  • Community support

Every new account also gets 30 days of Pro. When it ends, the free tier keeps working.

Point it at one database and see.

Get started free

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