explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JjhH

Settings
# exclusive inclusive rows x rows loops node
1. 5.249 441,683.961 ↓ 0.0 0 1

Nested Loop Semi Join (cost=26,989.14..91,633.10 rows=1 width=16) (actual time=441,683.961..441,683.961 rows=0 loops=1)

  • Join Filter: (iv.id = answers.interview_id)
2. 2,576.857 441,338.339 ↓ 2,813.0 2,813 1

Nested Loop (cost=26,988.44..91,631.15 rows=1 width=16) (actual time=365,045.752..441,338.339 rows=2,813 loops=1)

3. 897.175 430,150.801 ↓ 2,870,227.0 2,870,227 1

Hash Left Join (cost=26,987.87..91,629.41 rows=1 width=24) (actual time=365,015.325..430,150.801 rows=2,870,227 loops=1)

  • Hash Cond: (iv.id = civ.interview_id)
  • Filter: (civ.id IS NULL)
  • Rows Removed by Filter: 86
4. 2,534.466 429,252.968 ↓ 117.5 2,870,313 1

Nested Loop (cost=26,604.67..91,182.10 rows=24,423 width=24) (actual time=365,014.512..429,252.968 rows=2,870,313 loops=1)

5. 5,311.220 366,441.929 ↓ 121.8 2,870,313 1

HashAggregate (cost=26,604.10..26,839.76 rows=23,566 width=8) (actual time=365,014.335..366,441.929 rows=2,870,313 loops=1)

  • Group Key: answers_1.interview_id
6. 361,130.709 361,130.709 ↓ 117.5 2,870,469 1

Index Scan using ix_answers_questionnumber_answercode on answers answers_1 (cost=0.57..26,543.05 rows=24,423 width=8) (actual time=0.223..361,130.709 rows=2,870,469 loops=1)

  • Index Cond: ((question_number = 999) AND (answer_code = 9))
7. 60,276.573 60,276.573 ↑ 1.0 1 2,870,313

Index Scan using pk_interviews on interviews iv (cost=0.57..2.73 rows=1 width=16) (actual time=0.021..0.021 rows=1 loops=2,870,313)

  • Index Cond: (id = answers_1.interview_id)
8. 0.046 0.658 ↑ 8.3 86 1

Hash (cost=374.25..374.25 rows=716 width=16) (actual time=0.658..0.658 rows=86 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
9. 0.612 0.612 ↑ 8.3 86 1

Index Scan using ix_counterinterviews_counterid_versionidx on counter_interviews civ (cost=0.57..374.25 rows=716 width=16) (actual time=0.540..0.612 rows=86 loops=1)

  • Index Cond: ((counter_id = 199780) AND (version_idx = 4))
10. 8,610.681 8,610.681 ↓ 0.0 0 2,870,227

Index Only Scan using ix_respondents_projectid_id on respondents r (cost=0.57..1.74 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=2,870,227)

  • Index Cond: ((project_id = 3556) AND (id = iv.respondent_id))
  • Heap Fetches: 2813
11. 340.373 340.373 ↓ 0.0 0 2,813

Index Only Scan using ix_answers_interviewid_questionnumber_answercode on answers (cost=0.70..1.94 rows=1 width=8) (actual time=0.121..0.121 rows=0 loops=2,813)

  • Index Cond: ((interview_id = answers_1.interview_id) AND (question_number = 507) AND (answer_code = 4))
  • Heap Fetches: 0
Planning time : 3.165 ms
Execution time : 441,702.293 ms