explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B1kt

Settings
# exclusive inclusive rows x rows loops node
1. 374.220 5,783.411 ↑ 2.2 5 1

GroupAggregate (cost=69,023.71..69,023.93 rows=11 width=28) (actual time=5,267.791..5,783.411 rows=5 loops=1)

  • Group Key: forms.id
  • Buffers: shared hit=4551748 read=1
2. 459.268 5,409.191 ↓ 70,755.1 778,306 1

Sort (cost=69,023.71..69,023.74 rows=11 width=28) (actual time=5,267.724..5,409.191 rows=778,306 loops=1)

  • Sort Key: forms.id
  • Sort Method: quicksort Memory: 84436kB
  • Buffers: shared hit=4551748 read=1
3. 729.421 4,949.923 ↓ 70,755.1 778,306 1

Nested Loop Left Join (cost=57.25..69,023.52 rows=11 width=28) (actual time=0.126..4,949.923 rows=778,306 loops=1)

  • Join Filter: (answers.follow_up IS TRUE)
  • Rows Removed by Join Filter: 2334920
  • Buffers: shared hit=4551748 read=1
4. 236.751 2,663.890 ↓ 70,755.1 778,306 1

Nested Loop Left Join (cost=56.96..68,971.15 rows=11 width=29) (actual time=0.094..2,663.890 rows=778,306 loops=1)

  • Buffers: shared hit=2995136
5. 448.223 870.527 ↓ 70,755.1 778,306 1

Hash Right Join (cost=56.68..68,795.13 rows=11 width=28) (actual time=0.084..870.527 rows=778,306 loops=1)

  • Hash Cond: (form_responses.form_id = forms.id)
  • Join Filter: (forms.project_id = 20206)
  • Buffers: shared hit=185647
6. 422.252 422.252 ↑ 1.0 778,305 1

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..65,782.39 rows=783,335 width=16) (actual time=0.019..422.252 rows=778,305 loops=1)

  • Index Cond: (project_id = 20206)
  • Filter: ((deleted IS NOT TRUE) AND (is_unanswered IS NOT TRUE))
  • Rows Removed by Filter: 45727
  • Heap Fetches: 509
  • Buffers: shared hit=185632
7. 0.003 0.052 ↑ 2.2 5 1

Hash (cost=55.98..55.98 rows=11 width=20) (actual time=0.052..0.052 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=15
8. 0.031 0.049 ↑ 2.2 5 1

Bitmap Heap Scan on forms (cost=4.40..55.98 rows=11 width=20) (actual time=0.028..0.049 rows=5 loops=1)

  • Recheck Cond: (project_id = 20206)
  • Filter: (deleted IS NOT TRUE)
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=12
  • Buffers: shared hit=15
9. 0.018 0.018 ↑ 1.2 12 1

Bitmap Index Scan on forms_project_id_index (cost=0.00..4.39 rows=15 width=0) (actual time=0.018..0.018 rows=12 loops=1)

  • Index Cond: (project_id = 20206)
  • Buffers: shared hit=3
10. 1,556.612 1,556.612 ↓ 0.0 0 778,306

Index Scan using answers_form_id_index on answers (cost=0.29..15.99 rows=1 width=5) (actual time=0.002..0.002 rows=0 loops=778,306)

  • Index Cond: (forms.id = form_id)
  • Filter: (follow_up IS TRUE)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=2809489
11. 1,556.612 1,556.612 ↑ 1.3 3 778,306

Index Only Scan using questions_form_id_index on questions (cost=0.29..4.72 rows=4 width=4) (actual time=0.001..0.002 rows=3 loops=778,306)

  • Index Cond: (form_id = forms.id)
  • Heap Fetches: 0
  • Buffers: shared hit=1556612 read=1
Planning time : 1.014 ms