/tools

Workload analyzer

Find expensive and frequently called queries from local pg_stat_statements exports. Compare captures without uploading SQL or connecting to a database.

Export data and choose the right comparison

Accepts CSV with a header row, a JSON array, or a JSON object containing a rows array. Required fields: calls, total_exec_time (legacy total_time also works). Pairing entries requires dbid, userid, queryid and toplevel. Export bigint IDs and counters as strings to preserve their exact values.

Single mode shows accumulated counters. Interval mode subtracts two cumulative captures and derives interval means from time and call differences. Independent-window mode compares exports already representing separate observation windows; it does not turn cumulative captures into windows.

The read-only export below includes capture time and reset metadata. Replace the server label, then run it in your PostgreSQL client. The browser never runs this SQL. Entries may be evicted between captures, and snapshot collection is not an atomic measurement of the whole server.

PostgreSQL statistics documentation