Inclusive plan times cannot be added
Separate per-loop averages, inclusive parent work and parallel overlap before relating recorded plan measurements to client waiting time.
Database measurement and client waiting cover different intervals
The author reports a Seq Scan near 349ms and Execution near 463ms, while pgAdmin and JDBC take 30 or 45 seconds. Comments clarify a local connection, which still leaves delivery and client work to measure.
A plan helps inspect database work, but that gap alone does not prove the database needs no optimization. Database and client intervals require separate evidence.
A loop product preserves a number without creating a total
An average 2.5ms over 4 loops gives a 10ms product. A parent may already include that work, and parallel participants may run concurrently. Adding that 10ms to a parent or Workers can double-count or misinterpret overlap.
Keeping the original token distinguishes the source spelling 0.010 from 0.01. A decimal string product avoids hiding this audit inside binary floating-point multiplication.
The comparison rule should be reproducible
A positional comparison is limited but can be checked completely by another reader. A changed operator at a matching position is marked operator-changed; a rearrangement retaining the same operator is still only same-operator-at-position, without an identity inference.
Complete statements, unknown extensions, Workers, JIT and triggers remain for further PostgreSQL analysis. The report explains recorded scopes without replacing server measurement or validation in the receiving application.
Choose roles and retain the complete handoff
Choose paste or one JSON file independently for the primary plan and optional comparison. Only enabled roles and selected modes are read. Identical filenames do not change roles. Explicit server version supports PostgreSQL 16 only.
Primary and comparison raw UTF-8 sources together allow at most 1 MiB. Each filename allows 512 UTF-8 bytes and MIME label 128. Source/metadata budgets are checked before native file reading; originals, role, filename, byte count and SHA256 remain available.
Export TEXT plans separately as FORMAT JSON from PostgreSQL 16. This tool executes no SQL, connects to no database, and cannot establish optimization success or explain all client waiting time. The 2015 TEXT measurements are historical request context; the visible sample uses a saved controlled PostgreSQL 16.15 JSON export.
One absolute 10-second whole deadline starts before metadata/parameter validation and file reading and continues through Worker loading, processing and publication. Cancel, timeout or source change clears old report/table/download artifacts; rerun the same complete sources.
Complete report, CSV, original plans, version envelope and copy text total at most 16 MiB. Reserve capacity before large serialization; typed report/table JSON work separately allows 16 MiB, physical plus typed transport 32 MiB, and cumulative numeric paths 8 MiB. Over-budget work refuses atomically.
| Artifact | Purpose |
|---|---|
| report.json | Every tree, numeric token, scope, comparison and provenance |
| operators.csv | Every operator and complete sourceJSON; formula-safe quoted cells |
| plan-1-source.json / plan-2-source.json | Byte-exact primary and enabled comparison originals |
| envelope.json | Explicit version 16 wrapper; source array texts embedded unchanged |
| Copy | Full report, unchanged by preview clipping |
- Each role independently switches paste/file; disabled comparison ignores stale input.
- Use full originals to review every tree node, Workers, JIT, trigger and extension field.
- Cancel or source change clears old results/links; recover with the same complete request.
References
- Original request
Complete 2015 question, answers and author comments read. Original TEXT metrics are an explicit manual transcription, not a claim of PG16; separate PG 16.15 read-only expression-SELECT JSON cases are retained.
- Primary implementation reference
PostgreSQL 16 documentation explains planner cost, per-loop actual metrics and measurement overhead.
Tools in this category
Expand a tool to see its steps, options and supported formats, then open its workspace.
Inspect PostgreSQL 16 JSON plansRead one or two PostgreSQL 16 JSON plans, retain full trees, Workers and numeric spelling, explain loops and parallel scope, and compare matching positions.
Read one or two PostgreSQL 16 JSON plans, retain full trees, Workers and numeric spelling, explain loops and parallel scope, and compare matching positions.
Steps
- Confirm the original export is from PostgreSQL 16 and retain its JSON array.
- Select paste or file for the primary; optionally enable comparison and select its source independently.
- Read the complete trees, numeric spelling, loops/parallel scope and positional comparison.
- Download original plans, envelope, complete report and CSV; copy preserves the full report.
Available options
- Server major
- PostgreSQL 16
- Primary source
- Paste · File
- Enable comparison plan
- Off by default
- Comparison source
- Paste · File
Capabilities and limits
- Primary and comparison raw UTF-8 sources together allow at most 1 MiB. Each filename allows 512 UTF-8 bytes and MIME label 128. Source/metadata budgets are checked before native file reading; originals, role, filename, byte count and SHA256 remain available.
- Each plan has 1–32 statements, at most 2048 operators, operator depth 32 and 256 worker records. The version envelope and all source plans together have at most 100000 JSON values and depth 128 with the envelope root at 0; a source-array root is at depth 2.
- Only EXPLAIN FORMAT JSON arrays; no text-plan parser or SQL execution. Numeric metrics are finite, nonnegative and lossless. Duplicate keys, BOM, negative zero and unsafe integers refuse.
- If any operator-node Actual Startup Time, Actual Total Time, Actual Rows or Actual Loops appears, all four are required. Loop-product time/rows/loops need plain decimal tokens; exponent spelling refuses. Workers retain original fields and validate provided numbers. Partial Actual records such as missing TIMING OFF times currently refuse.
- Cost uses planner units. Actual time/rows are per-loop averages; exact decimal string products are reported. Inclusive child work and concurrent participants cannot be summed as wall time; buffers are not multiplied by loops.
- Two plans compare only identical statement/child positions, with added/removed/operator-changed flags. No identity or optimization inference. Complete files and copy text total at most 16 MiB.
- Choose paste or one JSON file independently for the primary plan and optional comparison. Only enabled roles and selected modes are read. Identical filenames do not change roles. Explicit server version supports PostgreSQL 16 only.
- Export TEXT plans separately as FORMAT JSON from PostgreSQL 16. This tool executes no SQL, connects to no database, and cannot establish optimization success or explain all client waiting time. The 2015 TEXT measurements are historical request context; the visible sample uses a saved controlled PostgreSQL 16.15 JSON export.
- One absolute 10-second whole deadline starts before metadata/parameter validation and file reading and continues through Worker loading, processing and publication. Cancel, timeout or source change clears old report/table/download artifacts; rerun the same complete sources.
- Complete report, CSV, original plans, version envelope and copy text total at most 16 MiB. Reserve capacity before large serialization; typed report/table JSON work separately allows 16 MiB, physical plus typed transport 32 MiB, and cumulative numeric paths 8 MiB. Over-budget work refuses atomically.