explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T53s : b.c gb forms, sort last received ASC

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 4,822.311 ↑ 1.0 20 1

Limit (cost=358,845.43..358,845.48 rows=20 width=16) (actual time=4,822.301..4,822.311 rows=20 loops=1)

  • Buffers: shared hit=163373, temp read=6578 written=11630
2. 0.118 4,822.303 ↑ 10.9 20 1

Sort (cost=358,845.43..358,845.98 rows=218 width=16) (actual time=4,822.300..4,822.303 rows=20 loops=1)

  • Sort Key: (max(form_responses.created_time))
  • Sort Method: top-N heapsort Memory: 28kB
  • Buffers: shared hit=163373, temp read=6578 written=11630
3. 1,120.897 4,822.185 ↑ 1.8 122 1

GroupAggregate (cost=314,433.48..358,839.63 rows=218 width=16) (actual time=1,588.041..4,822.185 rows=122 loops=1)

  • Group Key: form_responses.form_id
  • Buffers: shared hit=163373, temp read=6578 written=11630
4. 731.391 3,700.190 ↓ 1.0 1,599,470 1

Merge Join (cost=314,433.48..341,824.39 rows=1,544,575 width=16) (actual time=1,565.176..3,700.190 rows=1,599,470 loops=1)

  • Merge Cond: (forms.id = form_responses.form_id)
  • Buffers: shared hit=162269, temp read=5084 written=10136
5. 1.457 1.457 ↑ 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.008..1.457 rows=5,492 loops=1)

  • Heap Fetches: 43
  • Buffers: shared hit=52
6. 768.015 2,967.342 ↓ 1.0 1,599,470 1

Materialize (cost=314,432.02..322,154.89 rows=1,544,575 width=16) (actual time=1,564.924..2,967.342 rows=1,599,470 loops=1)

  • Buffers: shared hit=162217, temp read=5084 written=10136
7. 1,428.812 2,199.327 ↓ 1.0 1,599,470 1

Sort (cost=314,432.02..318,293.45 rows=1,544,575 width=16) (actual time=1,564.920..2,199.327 rows=1,599,470 loops=1)

  • Sort Key: form_responses.form_id
  • Sort Method: external merge Disk: 40632kB
  • Buffers: shared hit=162217, temp read=5084 written=5084
8. 770.515 770.515 ↓ 1.0 1,599,470 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..129,262.14 rows=1,544,575 width=16) (actual time=0.019..770.515 rows=1,599,470 loops=1)

  • Index Cond: (project_id = 20006)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 26819
  • Heap Fetches: 275
  • Buffers: shared hit=162217
9.          

SubPlan (forGroupAggregate)

10. 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
11. 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=4) (actual time=0.002..0.002 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_3 (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