Skip to content
Nik Samokhvalov· @samokhvalov · X·· 8d ago

pgPrism Released: A Tiny Embeddable PostgreSQL EXPLAIN Plan Visualizer

Key Takeaway

pgPrism is a tiny, embeddable PostgreSQL EXPLAIN plan visualizer that works anywhere with a single script tag. It has zero dependencies, is 37 KiB gzipped, shows BUFFERS first (blocks → bytes, e.

Why It Matters

With zero dependencies and a 37 KiB gzipped footprint, teams can embed plan views and BUFFERS costs directly in docs and dashboards, lowering the barrier to EXPLAIN analysis on PostgreSQL 15–19.

Technical Breakdown · Distilled from the original source

Form and integration

  • Positioned as a "tiny Postgres plan visualizer" embeddable in blogs, docs, dashboards, and reports via a single script tag.
  • No framework, no build step, no backend; zero dependencies, 37 KiB gzipped.

Plan display capabilities

  • BUFFERS first: converts blocks to bytes, e.g. hit=16636 → 130 MiB.
  • Finds what's wrong and jumps to the node; offers Table, Tree, and Flame views.
  • Converts JSON plans to Postgres text plans (jsonToText) and provides Copy for LLM.

Compatibility and license

  • Supports PostgreSQL 15–19, open source, GitHub link in the original post.
Source: Nik Samokhvalov (@samokhvalov)· x.com

PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.

View on X

Related PostgreSQL Reference