explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SEH4 : pst, all forms

Settings
# exclusive inclusive rows x rows loops node
1. 0.044 880.873 ↑ 2.0 33 1

Sort (cost=98,156.07..98,156.23 rows=65 width=16) (actual time=880.868..880.873 rows=33 loops=1)

  • Sort Key: (max(form_responses.created_time))
  • Sort Method: quicksort Memory: 31kB
  • Buffers: shared hit=86410
2. 210.410 880.829 ↑ 2.0 33 1

GroupAggregate (cost=84,976.88..98,154.11 rows=65 width=16) (actual time=392.814..880.829 rows=33 loops=1)

  • Group Key: form_responses.form_id
  • Buffers: shared hit=86410
3. 201.158 670.089 ↑ 1.0 473,471 1

Merge Join (cost=84,976.88..92,442.84 rows=473,661 width=16) (actual time=377.547..670.089 rows=473,471 loops=1)

  • Merge Cond: (forms.id = form_responses.form_id)
  • Buffers: shared hit=86014
4. 1.354 1.354 ↑ 1.0 5,477 1

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

  • Heap Fetches: 43
  • Buffers: shared hit=52
5. 235.304 467.577 ↑ 1.0 473,471 1

Sort (cost=84,975.41..86,159.57 rows=473,661 width=16) (actual time=377.119..467.577 rows=473,471 loops=1)

  • Sort Key: form_responses.form_id
  • Sort Method: quicksort Memory: 34482kB
  • Buffers: shared hit=85962
6. 232.273 232.273 ↑ 1.0 473,471 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..40,324.59 rows=473,661 width=16) (actual time=0.015..232.273 rows=473,471 loops=1)

  • Index Cond: (project_id = 20015)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 20137
  • Heap Fetches: 309
  • Buffers: shared hit=85962
7.          

SubPlan (forGroupAggregate)

8. 0.165 0.165 ↑ 1.0 1 33

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=33)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=99
9. 0.066 0.066 ↑ 1.0 1 33

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=33)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=99
10. 0.033 0.033 ↑ 1.0 1 33

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=33)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=99
11. 0.066 0.066 ↑ 1.0 1 33

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=33)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=99