explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bcSt

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.115 ↑ 1.0 1 1

Result (cost=48.03..48.04 rows=1 width=64) (actual time=0.115..0.115 rows=1 loops=1)

  • Buffers: shared hit=16
  • Buffers: shared hit=640
2.          

CTE resultcounts

3. 0.035 1.859 ↑ 1.0 2 1

GroupAggregate (cost=0.57..1,701.97 rows=2 width=44) (actual time=0.776..1.859 rows=2 loops=1)

  • Group Key: p.donationstatus
  • Buffers: shared hit=640
4. 0.000 1.824 ↓ 6.3 189 1

Nested Loop (cost=0.57..1,701.72 rows=30 width=9) (actual time=0.567..1.824 rows=189 loops=1)

  • Buffers: shared hit=640
5. 1.639 1.639 ↓ 6.3 189 1

Index Scan using batchfundproject_donationstatus_batchfundsettings on batchfundproject p (cost=0.42..1,648.62 rows=30 width=13) (actual time=0.553..1.639 rows=189 loops=1)

  • Index Cond: (batchfundsettingsid = 415)
  • Buffers: shared hit=262
6. 0.189 0.189 ↑ 1.0 1 189

Index Scan using batchfundexecution_pkey on batchfundexecution e (cost=0.15..1.77 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=189)

  • Index Cond: (id = p.batchfundexecutionid)
  • Filter: (completedtime IS NOT NULL)
  • Buffers: shared hit=378
7.          

CTE resultcounts

8. 0.035 1.859 ↑ 1.0 2 1

GroupAggregate (cost=0.57..1,701.97 rows=2 width=44) (actual time=0.776..1.859 rows=2 loops=1)

  • Group Key: p.donationstatus
  • Buffers: shared hit=640
9. 0.000 1.824 ↓ 6.3 189 1

Nested Loop (cost=0.57..1,701.72 rows=30 width=9) (actual time=0.567..1.824 rows=189 loops=1)

  • Buffers: shared hit=640
10. 1.639 1.639 ↓ 6.3 189 1

Index Scan using batchfundproject_donationstatus_batchfundsettings on batchfundproject p (cost=0.42..1,648.62 rows=30 width=13) (actual time=0.553..1.639 rows=189 loops=1)

  • Index Cond: (batchfundsettingsid = 415)
  • Buffers: shared hit=262
11. 0.189 0.189 ↑ 1.0 1 189

Index Scan using batchfundexecution_pkey on batchfundexecution e (cost=0.15..1.77 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=189)

  • Index Cond: (id = p.batchfundexecutionid)
  • Filter: (completedtime IS NOT NULL)
  • Buffers: shared hit=378
12.          

Initplan (for Result)

13. 1.863 1.863 ↑ 1.0 1 1

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

  • Filter: (donationstatus = 'FUNDED'::batchfunddonationstatus)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=640
14. 0.001 0.001 ↑ 1.0 1 1

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

  • Filter: (donationstatus = 'SKIPPED'::batchfunddonationstatus)
  • Rows Removed by Filter: 1
15. 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: 2
16. 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: 2
17. 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)
  • Rows Removed by Filter: 1
18. 0.000 0.090 ↓ 0.0 0 1

Execution Time: 1.976 ms47.88 rows=1 width=9) (cost=0..0 rows=0 width=0) (actual time=0.089..0.090 rows=0 loops=1)

  • Hash Cond: (p.batchfundexecutionid = e.id)
  • Filter: (e.completedtime IS NULL)
  • Rows Removed by Filter: 139
  • Buffers: shared hit=11
19.          

Initplan (for Execution Time: 1.976 ms47.88 rows=1 width=9))

20. 0.112 0.112 ↓ 0.0 0 1

CTE Scan on resultcounts (cost=0.00..0.02 rows=1 width=8) (actual time=0.112..0.112 rows=0 loops=1)

  • Filter: (donationstatus = 'FUNDED'::batchfunddonationstatus)
  • Buffers: shared hit=16
21. 0.000 0.000 ↓ 0.0 0 1

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

  • Filter: (donationstatus = 'SKIPPED'::batchfunddonationstatus)
22. 0.000 0.000 ↓ 0.0 0 1

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

  • Filter: (donationstatus = 'ERROR'::batchfunddonationstatus)
23. 0.000 0.000 ↓ 0.0 0 1

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

  • Filter: (donationstatus IS NULL)
24. 0.000 0.000 ↓ 0.0 0 1

CTE Scan on resultcounts resultcounts_4 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: (donationstatus = 'FUNDED'::batchfunddonationstatus)
25. 0.028 0.028 ↓ 4.6 139 1

Index Scan using batchfundproject_batchfundsettingsid on batchfundproject p (cost=0.42..9.23 rows=30 width=13) (actual time=0.008..0.028 rows=139 loops=1)

  • Index Cond: (batchfundsettingsid = 415)
  • Buffers: shared hit=7
26. 0.008 0.015 ↑ 79.4 16 1

Hash (cost=22.70..22.70 rows=1,270 width=12) (actual time=0.015..0.015 rows=16 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=1
27. 0.007 0.007 ↑ 79.4 16 1

Seq Scan on batchfundexecution e (cost=0.00..22.70 rows=1,270 width=12) (actual time=0.005..0.007 rows=16 loops=1)

  • Buffers: shared hit=1
Planning time : 0.575 ms
Execution time : 0.224 ms