explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d5j7

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 727.289 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1,385.73..104,208.90 rows=1 width=16) (actual time=727.288..727.289 rows=0 loops=1)

  • Join Filter: (iv.id = answers_1.interview_id)
  • Functions: 67
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 11.071 ms, Inlining 0.000 ms, Optimization 2.833 ms, Emission 40.237 ms, Total 54.141 ms
2. 0.000 727.172 ↓ 31.0 31 1

Nested Loop Semi Join (cost=1,385.03..104,206.95 rows=1 width=16) (actual time=17.820..727.172 rows=31 loops=1)

3. 0.000 152.324 ↓ 193,553.0 193,553 1

Gather (cost=1,384.33..104,204.45 rows=1 width=8) (actual time=16.268..152.324 rows=193,553 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
4. 9.320 236.660 ↓ 48,388.0 48,388 4 / 4

Hash Left Join (cost=384.33..103,204.35 rows=1 width=8) (actual time=11.529..236.660 rows=48,388 loops=4)

  • Hash Cond: (iv.id = civ.interview_id)
  • Filter: (civ.id IS NULL)
  • Rows Removed by Filter: 22
5. 36.301 227.143 ↓ 1.2 48,410 4 / 4

Nested Loop (cost=1.14..102,710.94 rows=41,985 width=8) (actual time=11.175..227.143 rows=48,410 loops=4)

6. 33.847 33.847 ↑ 1.1 31,399 4 / 4

Parallel Index Only Scan using ix_respondents_projectid_id on respondents r (cost=0.57..33,951.76 rows=33,791 width=8) (actual time=0.076..33.847 rows=31,399 loops=4)

  • Index Cond: (project_id = 3556)
  • Heap Fetches: 125596
7. 156.995 156.995 ↑ 1.0 2 125,596 / 4

Index Only Scan using ix_interviews_respondentid_id on interviews iv (cost=0.57..2.01 rows=2 width=16) (actual time=0.004..0.005 rows=2 loops=125,596)

  • Index Cond: (respondent_id = r.id)
  • Heap Fetches: 193639
8. 0.021 0.197 ↑ 8.3 86 4 / 4

Hash (cost=374.25..374.25 rows=716 width=16) (actual time=0.197..0.197 rows=86 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
9. 0.176 0.176 ↑ 8.3 86 4 / 4

Index Scan using ix_counterinterviews_counterid_versionidx on counter_interviews civ (cost=0.57..374.25 rows=716 width=16) (actual time=0.087..0.176 rows=86 loops=4)

  • Index Cond: ((counter_id = 199780) AND (version_idx = 4))
10. 580.659 580.659 ↓ 0.0 0 193,553

Index Only Scan using ix_answers_interviewid_questionnumber_answercode on answers (cost=0.70..1.60 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=193,553)

  • Index Cond: ((interview_id = iv.id) AND (question_number = 507) AND (answer_code = 4))
  • Heap Fetches: 31
11. 0.093 0.093 ↓ 0.0 0 31

Index Only Scan using ix_answers_interviewid_questionnumber_answercode on answers answers_1 (cost=0.70..1.93 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=31)

  • Index Cond: ((interview_id = answers.interview_id) AND (question_number = 999) AND (answer_code = 9))
  • Heap Fetches: 0
Execution time : 779.353 ms