explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Plg2

Settings
# exclusive inclusive rows x rows loops node
1. 762.030 3,883.911 ↓ 1.2 147 1

GroupAggregate (cost=135,245.42..135,256.02 rows=121 width=28) (actual time=2,657.182..3,883.911 rows=147 loops=1)

  • Group Key: forms.id
  • Buffers: shared hit=162485 dirtied=7, temp read=6647 written=6647
2. 1,503.771 3,121.881 ↓ 1,703.5 1,599,561 1

Sort (cost=135,245.42..135,247.77 rows=939 width=28) (actual time=2,657.149..3,121.881 rows=1,599,561 loops=1)

  • Sort Key: forms.id
  • Sort Method: external merge Disk: 53168kB
  • Buffers: shared hit=162485 dirtied=7, temp read=6647 written=6647
3. 870.246 1,618.110 ↓ 1,703.5 1,599,561 1

Hash Right Join (cost=318.64..135,199.06 rows=939 width=28) (actual time=0.414..1,618.110 rows=1,599,561 loops=1)

  • Hash Cond: (form_responses.form_id = forms.id)
  • Join Filter: (forms.project_id = 20006)
  • Buffers: shared hit=162485 dirtied=7
4. 747.475 747.475 ↓ 1.1 1,599,536 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..128,768.42 rows=1,521,138 width=16) (actual time=0.016..747.475 rows=1,599,536 loops=1)

  • Index Cond: (project_id = 20006)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 26824
  • Heap Fetches: 414
  • Buffers: shared hit=162354 dirtied=7
5. 0.067 0.389 ↓ 1.2 147 1

Hash (cost=316.57..316.57 rows=121 width=20) (actual time=0.389..0.389 rows=147 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=131
6. 0.286 0.322 ↓ 1.2 147 1

Bitmap Heap Scan on forms (cost=5.53..316.57 rows=121 width=20) (actual time=0.065..0.322 rows=147 loops=1)

  • Recheck Cond: (project_id = 20006)
  • Filter: (deleted IS NOT TRUE)
  • Rows Removed by Filter: 15
  • Heap Blocks: exact=126
  • Buffers: shared hit=131
7. 0.036 0.036 ↑ 1.0 162 1

Bitmap Index Scan on forms_project_id_index (cost=0.00..5.50 rows=162 width=0) (actual time=0.036..0.036 rows=162 loops=1)

  • Index Cond: (project_id = 20006)
  • Buffers: shared hit=5