explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d5kJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 22.609 ↑ 1.0 1 1

Result (cost=2,370.39..2,370.40 rows=1 width=64) (actual time=22.608..22.609 rows=1 loops=1)

  • Buffers: shared hit=595
2.          

CTE resultcounts

3. 6.408 22.595 ↑ 2.0 1 1

HashAggregate (cost=2,370.14..2,370.17 rows=2 width=44) (actual time=22.595..22.595 rows=1 loops=1)

  • Group Key: p.donationstatus
  • Buffers: shared hit=595
4. 8.136 16.187 ↑ 1.1 35,205 1

Hash Join (cost=299.80..2,077.94 rows=38,960 width=9) (actual time=2.602..16.187 rows=35,205 loops=1)

  • Hash Cond: (p.batchfundexecutionid = e.id)
  • Buffers: shared hit=595
5. 5.545 5.545 ↑ 1.0 38,826 1

Index Scan using batchfundproject_batchfundsettingsid on batchfundproject p (cost=0.42..1,676.27 rows=38,960 width=13) (actual time=0.014..5.545 rows=38,826 loops=1)

  • Index Cond: (batchfundsettingsid = 411)
  • Buffers: shared hit=518
6. 1.258 2.506 ↑ 1.0 10,017 1

Hash (cost=174.17..174.17 rows=10,017 width=4) (actual time=2.506..2.506 rows=10,017 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 481kB
  • Buffers: shared hit=74
7. 1.248 1.248 ↑ 1.0 10,017 1

Seq Scan on batchfundexecution e (cost=0.00..174.17 rows=10,017 width=4) (actual time=0.006..1.248 rows=10,017 loops=1)

  • Filter: (completedtime IS NOT NULL)
  • Buffers: shared hit=74
8.          

Initplan (for Result)

9. 22.600 22.600 ↑ 1.0 1 1

CTE Scan on resultcounts (cost=0.00..0.04 rows=1 width=8) (actual time=22.599..22.600 rows=1 loops=1)

  • Filter: (donationstatus = 'FUNDED'::batchfunddonationstatus)
  • Buffers: shared hit=595
10. 0.001 0.001 ↓ 0.0 0 1

CTE Scan on resultcounts resultcounts_1 (cost=0.00..0.04 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (donationstatus = 'SKIPPED'::batchfunddonationstatus)
  • Rows Removed by Filter: 1
11. 0.001 0.001 ↓ 0.0 0 1

CTE Scan on resultcounts resultcounts_2 (cost=0.00..0.04 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (donationstatus = 'ERROR'::batchfunddonationstatus)
  • Rows Removed by Filter: 1
12. 0.001 0.001 ↓ 0.0 0 1

CTE Scan on resultcounts resultcounts_3 (cost=0.00..0.04 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (donationstatus IS NULL)
  • Rows Removed by Filter: 1
13. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on resultcounts resultcounts_4 (cost=0.00..0.04 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=1)

  • Filter: (donationstatus = 'FUNDED'::batchfunddonationstatus)
Planning time : 0.773 ms
Execution time : 22.764 ms