explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rot9 : b.c. ALL results

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 4,903.699 ↑ 1.0 122 1

Limit (cost=358,868.53..358,868.84 rows=122 width=16) (actual time=4,903.623..4,903.699 rows=122 loops=1)

  • Buffers: shared hit=163387, temp read=6578 written=11630
2. 0.179 4,903.652 ↑ 1.8 122 1

Sort (cost=358,868.53..358,869.08 rows=218 width=16) (actual time=4,903.621..4,903.652 rows=122 loops=1)

  • Sort Key: (count(DISTINCT form_responses.id))
  • Sort Method: quicksort Memory: 45kB
  • Buffers: shared hit=163387, temp read=6578 written=11630
3. 1,165.818 4,903.473 ↑ 1.8 122 1

GroupAggregate (cost=314,453.74..358,860.06 rows=218 width=16) (actual time=1,535.367..4,903.473 rows=122 loops=1)

  • Group Key: form_responses.form_id
  • Buffers: shared hit=163387, temp read=6578 written=11630
4. 728.092 3,736.069 ↓ 1.0 1,599,474 1

Merge Join (cost=314,453.74..341,844.77 rows=1,544,582 width=16) (actual time=1,527.240..3,736.069 rows=1,599,474 loops=1)

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

  • Heap Fetches: 43
  • Buffers: shared hit=52
6. 793.205 3,006.050 ↓ 1.0 1,599,474 1

Materialize (cost=314,452.28..322,175.19 rows=1,544,582 width=16) (actual time=1,526.967..3,006.050 rows=1,599,474 loops=1)

  • Buffers: shared hit=162231, temp read=5084 written=10136
7. 1,459.150 2,212.845 ↓ 1.0 1,599,474 1

Sort (cost=314,452.28..318,313.73 rows=1,544,582 width=16) (actual time=1,526.963..2,212.845 rows=1,599,474 loops=1)

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

Index Only Scan using form_responses_form_id_mailing_id_covering_index on form_responses (cost=0.56..129,281.63 rows=1,544,582 width=16) (actual time=0.019..753.695 rows=1,599,474 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: 288
  • Buffers: shared hit=162231
9.          

SubPlan (forGroupAggregate)

10. 1.098 1.098 ↑ 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.008..0.009 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.002..0.002 rows=1 loops=122)

  • Index Cond: (id = form_responses.form_id)
  • Buffers: shared hit=368
Planning time : 0.493 ms