explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g0M2

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 4.894 ↓ 6.0 6 1

Subquery Scan on x (cost=858.56..858.60 rows=1 width=1,134) (actual time=4.881..4.894 rows=6 loops=1)

  • Filter: (x.rank = 1)
  • Rows Removed by Filter: 6
2.          

CTE upcoming_video_interviews

3. 0.001 4.850 ↓ 12.0 12 1

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

4. 0.030 4.849 ↓ 24.0 24 1

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

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

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

6. 0.028 4.769 ↓ 24.0 24 1

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

7. 0.001 4.717 ↓ 24.0 24 1

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

8. 0.003 4.668 ↓ 24.0 24 1

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

9. 0.015 4.617 ↓ 24.0 24 1

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

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

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

11. 4.476 4.476 ↓ 3.5 28 1

Seq Scan on interview_schedule_occurrences (cost=0.00..715.88 rows=8 width=8) (actual time=3.612..4.476 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.056 0.056 ↑ 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.002..0.002 rows=1 loops=28)

  • Index Cond: (occurrence_id = interview_schedule_occurrences.id)
  • Filter: ((status)::text = ANY ('{registered,accepted}'::text[]))
13. 0.048 0.048 ↑ 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.002..0.002 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.001..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.001..0.002 rows=1 loops=24)

  • Index Cond: (id = interview_slots.schedule_id)
16. 0.024 0.024 ↑ 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.001..0.001 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.001..0.002 rows=1 loops=24)

  • Index Cond: (id = event_schedules.event_id)
18. 0.015 4.891 ↓ 12.0 12 1

WindowAgg (cost=0.03..0.06 rows=1 width=1,134) (actual time=4.880..4.891 rows=12 loops=1)

19. 0.016 4.876 ↓ 12.0 12 1

Sort (cost=0.03..0.04 rows=1 width=1,126) (actual time=4.875..4.876 rows=12 loops=1)

  • Sort Key: upcoming_video_interviews.occurrence_id, upcoming_video_interviews.group_id, upcoming_video_interviews.start_time
  • Sort Method: quicksort Memory: 28kB
20. 4.860 4.860 ↓ 12.0 12 1

CTE Scan on upcoming_video_interviews (cost=0.00..0.02 rows=1 width=1,126) (actual time=4.846..4.860 rows=12 loops=1)