explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zNXd

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 6.314 ↓ 3.0 6 1

Unique (cost=858.72..858.81 rows=2 width=1,126) (actual time=6.310..6.314 rows=6 loops=1)

2.          

CTE stuff

3. 0.004 6.159 ↓ 12.0 12 1

Unique (cost=858.52..858.53 rows=1 width=188) (actual time=6.153..6.159 rows=12 loops=1)

4. 0.047 6.155 ↓ 24.0 24 1

Sort (cost=858.52..858.53 rows=1 width=188) (actual time=6.153..6.155 rows=24 loops=1)

  • Sort Key: video_interviews.id
  • Sort Method: quicksort Memory: 31kB
5. 0.030 6.108 ↓ 24.0 24 1

Nested Loop (cost=1.72..858.51 rows=1 width=188) (actual time=5.697..6.108 rows=24 loops=1)

6. 0.025 6.030 ↓ 24.0 24 1

Nested Loop (cost=1.44..858.10 rows=1 width=165) (actual time=5.690..6.030 rows=24 loops=1)

7. 0.027 5.957 ↓ 24.0 24 1

Nested Loop (cost=1.15..857.73 rows=1 width=165) (actual time=5.685..5.957 rows=24 loops=1)

8. 0.023 5.882 ↓ 24.0 24 1

Nested Loop (cost=0.86..857.39 rows=1 width=161) (actual time=5.678..5.882 rows=24 loops=1)

9. 0.023 5.811 ↓ 24.0 24 1

Nested Loop (cost=0.57..856.90 rows=1 width=145) (actual time=5.672..5.811 rows=24 loops=1)

  • Join Filter: (interview_schedule_occurrences.id = video_interviews.occurrence_id)
10. 0.013 5.716 ↓ 12.0 24 1

Nested Loop (cost=0.29..855.74 rows=2 width=16) (actual time=5.661..5.716 rows=24 loops=1)

11. 5.591 5.591 ↓ 3.5 28 1

Seq Scan on interview_schedule_occurrences (cost=0.00..715.88 rows=8 width=8) (actual time=4.152..5.591 rows=28 loops=1)

  • Filter: ((actual_date >= '2020-01-07'::date) AND (actual_date <= '2020-01-09'::date))
  • Rows Removed by Filter: 28243
12. 0.112 0.112 ↑ 1.0 1 28

Index Scan using index_slot_attendances_on_occurrence_id on slot_attendances (cost=0.29..17.47 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=28)

  • Index Cond: (occurrence_id = interview_schedule_occurrences.id)
  • Filter: ((status)::text = ANY ('{registered,accepted}'::text[]))
13. 0.072 0.072 ↑ 1.0 1 24

Index Scan using index_video_interviews_on_slot_id_and_occurrence_id on video_interviews (cost=0.29..0.57 rows=1 width=137) (actual time=0.003..0.003 rows=1 loops=24)

  • Index Cond: ((slot_id = slot_attendances.slot_id) AND (occurrence_id = slot_attendances.occurrence_id))
  • Filter: (reminder_sent IS FALSE)
14. 0.048 0.048 ↑ 1.0 1 24

Index Scan using interview_slots_pkey on interview_slots (cost=0.29..0.48 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=24)

  • Index Cond: (id = video_interviews.slot_id)
15. 0.048 0.048 ↑ 1.0 1 24

Index Scan using interview_schedules_pkey on interview_schedules (cost=0.29..0.32 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=24)

  • Index Cond: (id = interview_slots.schedule_id)
16. 0.048 0.048 ↑ 1.0 1 24

Index Scan using event_schedules_pkey on event_schedules (cost=0.29..0.37 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=24)

  • Index Cond: (id = interview_schedules.owner_id)
17. 0.048 0.048 ↑ 1.0 1 24

Index Scan using events_pkey on events (cost=0.29..0.40 rows=1 width=27) (actual time=0.002..0.002 rows=1 loops=24)

  • Index Cond: (id = event_schedules.event_id)
18. 0.077 6.312 ↓ 3.0 6 1

Sort (cost=0.20..0.20 rows=2 width=1,126) (actual time=6.310..6.312 rows=6 loops=1)

  • Sort Key: stuff.id, stuff.slot_id, stuff.occurrence_id, stuff.session_id, stuff.created_at, stuff.updated_at, stuff.reminder_sent, stuff.p2p_preference, stuff.calendar_item_id, stuff.interview_url, stuff.start_time, stuff.end_time, stuff.time_zone, stuff.actual_date, stuff.event_id, stuff.group_id
  • Sort Method: quicksort Memory: 26kB
19. 0.003 6.235 ↓ 3.0 6 1

Append (cost=0.03..0.18 rows=2 width=1,126) (actual time=6.188..6.235 rows=6 loops=1)

20. 0.012 6.206 ↓ 4.0 4 1

Nested Loop (cost=0.03..0.09 rows=1 width=1,126) (actual time=6.188..6.206 rows=4 loops=1)

  • Join Filter: ((stuff.group_id = stuff_1.group_id) AND (stuff.occurrence_id = stuff_1.occurrence_id) AND (stuff.start_time = (min(stuff_1.start_time))))
  • Rows Removed by Join Filter: 44
21. 6.158 6.158 ↓ 12.0 12 1

CTE Scan on stuff (cost=0.00..0.02 rows=1 width=1,126) (actual time=6.156..6.158 rows=12 loops=1)

22. 0.021 0.036 ↓ 4.0 4 12

HashAggregate (cost=0.03..0.04 rows=1 width=16) (actual time=0.003..0.003 rows=4 loops=12)

  • Group Key: stuff_1.group_id, stuff_1.occurrence_id
23. 0.015 0.015 ↓ 8.0 8 1

CTE Scan on stuff stuff_1 (cost=0.00..0.02 rows=1 width=16) (actual time=0.001..0.015 rows=8 loops=1)

  • Filter: (group_id IS NOT NULL)
  • Rows Removed by Filter: 4
24. 0.000 0.026 ↓ 2.0 2 1

Nested Loop (cost=0.02..0.08 rows=1 width=1,126) (actual time=0.022..0.026 rows=2 loops=1)

  • Join Filter: ((stuff_2.occurrence_id = stuff_3.occurrence_id) AND (stuff_2.start_time = (min(stuff_3.start_time))))
  • Rows Removed by Join Filter: 22
25. 0.002 0.002 ↓ 12.0 12 1

CTE Scan on stuff stuff_2 (cost=0.00..0.02 rows=1 width=1,126) (actual time=0.001..0.002 rows=12 loops=1)

26. 0.020 0.024 ↓ 2.0 2 12

HashAggregate (cost=0.02..0.03 rows=1 width=12) (actual time=0.001..0.002 rows=2 loops=12)

  • Group Key: stuff_3.occurrence_id
27. 0.004 0.004 ↓ 4.0 4 1

CTE Scan on stuff stuff_3 (cost=0.00..0.02 rows=1 width=12) (actual time=0.003..0.004 rows=4 loops=1)

  • Filter: (group_id IS NULL)
  • Rows Removed by Filter: 8