explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WE9s : B.C. More memory for Sorting

Settings
# exclusive inclusive rows x rows loops node
1. 0.144 3,848.669 ↑ 1.7 122 1

Sort (cost=331,791.51..331,792.04 rows=212 width=16) (actual time=3,848.646..3,848.669 rows=122 loops=1)

  • Sort Key: ((SubPlan 2))
  • Sort Method: quicksort Memory: 51kB
  • Buffers: shared hit=163971 dirtied=8, temp read=5864 written=5864
2. 733.622 3,848.525 ↑ 1.7 122 1

GroupAggregate (cost=289,609.32..331,783.32 rows=212 width=16) (actual time=2,031.746..3,848.525 rows=122 loops=1)

  • Group Key: form_responses.form_id
  • Buffers: shared hit=163971 dirtied=8, temp read=5864 written=5864
3. 677.171 3,113.683 ↓ 1.0 1,599,516 1

Merge Join (cost=289,609.32..313,151.77 rows=1,545,400 width=16) (actual time=2,025.931..3,113.683 rows=1,599,516 loops=1)

  • Merge Cond: (forms.id = form_responses.form_id)
  • Buffers: shared hit=162499 dirtied=8, temp read=5864 written=5864
4. 1.477 1.477 ↑ 1.0 5,492 1

Index Only Scan using forms_pkey on forms (cost=0.28..355.43 rows=5,635 width=4) (actual time=0.011..1.477 rows=5,492 loops=1)

  • Heap Fetches: 43
  • Buffers: shared hit=52
5. 1,683.966 2,435.035 ↓ 1.0 1,599,516 1

Sort (cost=289,607.86..293,471.36 rows=1,545,400 width=16) (actual time=2,025.674..2,435.035 rows=1,599,516 loops=1)

  • Sort Key: form_responses.form_id
  • Sort Method: external sort Disk: 46912kB
  • Buffers: shared hit=162447 dirtied=8, temp read=5864 written=5864
6. 751.069 751.069 ↓ 1.0 1,599,516 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..130,744.23 rows=1,545,400 width=16) (actual time=0.019..751.069 rows=1,599,516 loops=1)

  • Index Cond: (project_id = 20006)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 26823
  • Heap Fetches: 514
  • Buffers: shared hit=162447 dirtied=8
7.          

SubPlan (forGroupAggregate)

8. 0.610 0.610 ↑ 1.0 1 122

Index Scan using forms_pkey on forms forms_1 (cost=0.28..8.30 rows=1 width=26) (actual time=0.005..0.005 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
9. 0.244 0.244 ↑ 1.0 1 122

Index Scan using forms_pkey on forms forms_2 (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
10. 0.122 0.122 ↑ 1.0 1 122

Index Scan using forms_pkey on forms forms_3 (cost=0.28..8.30 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
11. 0.244 0.244 ↑ 1.0 1 122

Index Scan using forms_pkey on forms forms_4 (cost=0.28..8.30 rows=1 width=18) (actual time=0.001..0.002 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
Planning time : 0.722 ms