slowplan

v0.1.0
io.github.GillMacedo/slowplan Checked 1 day ago Published 1 month ago

Find why a PostgreSQL query is slow from its EXPLAIN output, without a database connection.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

postgres_plan_compare Compare two PostgreSQL query plans

Compares EXPLAIN output from before and after a change, such as a new index, and shows the timing change and which problems were fixed, remain or are new. It never connects to a database.

ParameterTypeDescription
afterstringEXPLAIN output after the change
after_pathstringPath to a file with the plan after the change
beforestringEXPLAIN output before the change
before_pathstringPath to a file with the plan before the change

postgres_plan_review Review a PostgreSQL query plan

Finds why a PostgreSQL query is slow from its EXPLAIN output, in text or JSON: where the time goes, and problems such as sequential scans throwing away rows, wrong row estimates, sorts and hashes spilling to disk, and nested loops run many times. Use after running EXPLAIN (ANALYZE, BUFFERS). It only reads the text you give it and never connects to a database. Suggested indexes are candidates to test.

ParameterTypeDescription
pathstringPath to a file holding EXPLAIN output. Give this or plan
planstringEXPLAIN output as text or JSON. Give this or path