explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P1W8 : Finalize Aggregate (cost=2486204.69..2486204.70 rows=1 width=8) (actual time=51251.358..51251.359 rows=1 loops=1) Output: count(*) Buffers: shared hit=2290245 read=783 dirtied=22, temp read=241317 written=240297 -> Gather (cost=2486204.48..2486204.69 rows=2 width=8) (actual time=51251.348..51251.448 rows=2 loops=1) Output: (PARTIAL count(*)) Workers Planned: 2 Workers Launched: 1 Buffers: shared hit=2290245 read=783 dirtied=22, temp read=241317 written=240297 -> Partial Aggregate (cost=2485204.48..2485204.49 rows=1 width=8) (actual time=50457.550..50457.551 rows=1 loops=2) Output: PARTIAL count(*) Buffers: shared hit=2290245 read=783 dirtied=22, temp read=241317 written=240297 Worker 0: actual time=49664.133..49664.134 rows=1 loops=1 Buffers: shared hit=1138739 read=371 dirtied=12, temp read=119236 written=118726 -> Hash Join (cost=1684015.73..2454489.15 rows=12286132 width=0) (actual time=25283.942..46373.210 rows=13075046 loops=2) Inner Unique: true Hash Cond: (orders.order_request_id = order_requests.id) Buffers: shared hit=2290245 read=783 dirtied=22, temp read=241317 written=240297 Worker 0: actual time=26431.409..45840.568 rows=12587020 loops=1 Buffers: shared hit=1138739 read=371 dirtied=12, temp read=119236 written=118726 -> Parallel Seq Scan on public.orders (cost=0.00..532287.32 rows=12286132 width=4) (actual time=0.007..5398.061 rows=15398747 loops=2) Output: orders.order_request_id Buffers: shared hit=408643 read=783 dirtied=22 Worker 0: actual time=0.008..4857.224 rows=14774342 loops=1 Buffers: shared hit=197902 read=371 dirtied=12 -> Hash (cost=1222230.77..1222230.77 rows=28146877 width=4) (actual time=25280.442..25280.442 rows=28005367 loops=2) Output: order_requests.id Buckets: 262144 Batches: 256 Memory Usage: 5875kB Buffers: shared hit=1881524, temp written=163212 Worker 0: actual time=26426.874..26426.874 rows=28005367 loops=1 Buffers: shared hit=940762, temp written=81606 -> Seq Scan on public.order_requests (cost=0.00..1222230.77 rows=28146877 width=4) (actual time=0.024..12147.658 rows=28005367 loops=2) Output: order_requests.id Buffers: shared hit=1881524 Worker 0: actual time=0.042..12605.414 rows=28005367 loops=1 Buffers: shared hit=940762 Planning time: 0.362 ms Execution time: 51251.520 ms (37 rows)

Settings
# exclusive inclusive rows x rows loops node
1. 0.158 55.012 ↑ 11.4 71 1

Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
  • Sort Method: quicksort Memory: 43kB
2. 1.378 54.854 ↑ 11.4 71 1

Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

  • Hash Cond: (p.pronamespace = n.oid)
3. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: pg_function_is_visible(oid)
4. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))