← Try the tool
Free tool

Database Schema Analyzer

Paste your SQL and get a graded PostgreSQL schema health report in seconds. Missing keys, slow joins, naming drift — flagged with a fix for each. Free, no signup, private.

Missing primary keys

Unindexed foreign keys

Nullable foreign keys

Naming drift

Wide tables

Audit columns

Upload .sql fileDrop a file or paste above.
?

Paste SQL to get your schema grade

Missing primary keys, unindexed foreign keys, naming drift — the analyzer checks your schema and grades it in seconds. Nothing leaves your browser.

What the analyzer checks

  • Primary keys on every table — missing keys break identity and replication
  • Foreign key indexes — Postgres does not auto-index FK columns, unindexed joins are slow
  • Nullable foreign keys — usually a design smell unless the relation is optional
  • Naming consistency — mixed snake_case and camelCase across tables
  • Table shape — unusually wide tables and missing audit columns

Frequently asked questions

What does the database schema analyzer check?

Seven checks: tables without a primary key, foreign keys that may lack an index, nullable foreign keys, id columns that are not the primary key, mixed naming conventions, unusually wide tables, and missing created_at audit columns. Each issue ships with a one-line fix.

Is my SQL private?

Yes. The analyzer runs entirely in your browser. Your SQL is parsed locally and never sent to any server, stored, or logged.

Why does a missing index on a foreign key matter?

PostgreSQL does not automatically index foreign key columns. Without an index, every join and every delete on the parent table can degrade into a sequential scan. Adding the index is usually a one-line CREATE INDEX.

What is a good schema health score?

90+ (grade A) means a clean schema with at most minor notes. 75-89 (B) is healthy with a few warnings worth fixing. Below 60 (D) usually means missing primary keys — fix those first, they affect correctness, not just performance.

Can I export the report?

Yes. Copy it as Markdown for a pull request or design doc, or download it as a .md file. No account required.

What do I do after fixing the issues?

Paste the fixed SQL into dbdiagramr to visualize the clean schema as an interactive ER diagram, or connect your live PostgreSQL database to confirm the report matches what is actually deployed.

Related tools

See your healthy schema as a diagram

Paste your PostgreSQL connection string and get an interactive ER diagram in under 10 seconds. No signup required.

Try it free →