explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZLmq

Settings
# exclusive inclusive rows x rows loops node
1. 0.148 4,758.970 ↑ 1.7 122 1

Sort (cost=361,854.45..361,854.98 rows=212 width=16) (actual time=4,758.952..4,758.970 rows=122 loops=1)

  • Sort Key: ((SubPlan 2))
  • Sort Method: quicksort Memory: 51kB
  • Buffers: shared hit=164010 dirtied=19, temp read=6578 written=11630
2. 1,124.336 4,758.822 ↑ 1.7 122 1

GroupAggregate (cost=315,810.66..361,846.25 rows=212 width=16) (actual time=1,555.630..4,758.822 rows=122 loops=1)

  • Group Key: form_responses.form_id
  • Buffers: shared hit=164010 dirtied=19, temp read=6578 written=11630
3. 712.893 3,633.144 ↓ 1.0 1,599,513 1

Merge Join (cost=315,810.66..343,215.27 rows=1,545,324 width=16) (actual time=1,547.608..3,633.144 rows=1,599,513 loops=1)

  • Merge Cond: (forms.id = form_responses.form_id)
  • Buffers: shared hit=162538 dirtied=19, temp read=5084 written=10136
4. 1.478 1.478 ↑ 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.027..1.478 rows=5,492 loops=1)

  • Heap Fetches: 43
  • Buffers: shared hit=52
5. 756.237 2,918.773 ↓ 1.0 1,599,513 1

Materialize (cost=315,809.20..323,535.82 rows=1,545,324 width=16) (actual time=1,547.342..2,918.773 rows=1,599,513 loops=1)

  • Buffers: shared hit=162486 dirtied=19, temp read=5084 written=10136
6. 1,399.514 2,162.536 ↓ 1.0 1,599,513 1

Sort (cost=315,809.20..319,672.51 rows=1,545,324 width=16) (actual time=1,547.338..2,162.536 rows=1,599,513 loops=1)

  • Sort Key: form_responses.form_id
  • Sort Method: external merge Disk: 40632kB
  • Buffers: shared hit=162486 dirtied=19, temp read=5084 written=5084
7. 763.022 763.022 ↓ 1.0 1,599,513 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..130,542.93 rows=1,545,324 width=16) (actual time=0.029..763.022 rows=1,599,513 loops=1)

  • Index Cond: (project_id = 20006)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 26822
  • Heap Fetches: 577
  • Buffers: shared hit=162486 dirtied=19
8.          

SubPlan (forGroupAggregate)

9. 0.732 0.732 ↑ 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.006 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
10. 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
11. 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
12. 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.969 ms