Skip to content
HALOWERK

Codewerk

explain review

Reads EXPLAIN output in JSON format (with or without ANALYZE/BUFFERS) and walks the plan tree. Exclusive time per node is computed as Actual Total Time × Actual Loops minus the same for its children (PostgreSQL 18 manual, 14.1 Using EXPLAIN: times are per-loop averages); without ANALYZE the exclusive cost is used. Findings: Seq Scans that discard most rows by filter (with the filter columns as index candidates), row estimates off by a factor (default 10), sorts and hashes that spill to disk,.

POST https://code.halowerk.com/v1/explain-review

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
planSee schemaYesEXPLAIN (FORMAT JSON) output as array, object or JSON string.
misestimate_factornumberNo
min_rows_removedintegerNo
min_inner_loopsintegerNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "plan"
  ],
  "properties": {
    "plan": {
      "description": "EXPLAIN (FORMAT JSON) output as array, object or JSON string.",
      "anyOf": [
        {
          "type": "array",
          "maxItems": 5
        },
        {
          "type": "object"
        },
        {
          "type": "string",
          "maxLength": 5000000
        }
      ]
    },
    "misestimate_factor": {
      "type": "number",
      "minimum": 2,
      "maximum": 10000,
      "default": 10
    },
    "min_rows_removed": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000000,
      "default": 1000
    },
    "min_inner_loops": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000000,
      "default": 1000
    }
  }
}

Open original schema

Published input example

{
  "plan": [
    {
      "Plan": {
        "Node Type": "Seq Scan",
        "Relation Name": "orders",
        "Alias": "orders",
        "Total Cost": 1693,
        "Plan Rows": 1000,
        "Actual Total Time": 12.4,
        "Actual Rows": 950,
        "Actual Loops": 1,
        "Filter": "(status = 'open'::text)",
        "Rows Removed by Filter": 99050
      },
      "Planning Time": 0.1,
      "Execution Time": 12.6
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →