explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L5UI

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1.134 ↑ 1.0 1 1

Limit (cost=483.68..483.69 rows=1 width=8) (actual time=1.134..1.134 rows=1 loops=1)

2. 0.003 1.133 ↑ 1.0 1 1

Aggregate (cost=483.68..483.69 rows=1 width=8) (actual time=1.133..1.133 rows=1 loops=1)

3. 0.026 1.130 ↓ 0.0 0 1

Nested Loop (cost=473.06..483.68 rows=1 width=0) (actual time=1.130..1.130 rows=0 loops=1)

4. 0.002 1.065 ↓ 39.0 39 1

Nested Loop (cost=472.78..483.37 rows=1 width=4) (actual time=0.518..1.065 rows=39 loops=1)

5. 0.000 0.985 ↓ 39.0 39 1

Nested Loop (cost=472.36..480.71 rows=1 width=12) (actual time=0.508..0.985 rows=39 loops=1)

6. 0.021 0.637 ↓ 178.0 178 1

Nested Loop (cost=471.92..478.22 rows=1 width=12) (actual time=0.491..0.637 rows=178 loops=1)

7. 0.019 0.019 ↑ 1.0 1 1

Index Scan using school_users_idx4 on school_users su (cost=0.42..3.35 rows=1 width=12) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: (usr_id = 342,130)
  • Filter: (('2020-07-30 10:13:02'::timestamp without time zone >= start_date) AND ('2020-07-30 10:13:02'::timestamp without time zone <= COALESCE(end_date, '2020-07-30 10:13:02'::timestamp without time zone)))
8. 0.138 0.597 ↓ 59.3 178 1

Bitmap Heap Scan on timetable tt (cost=471.50..474.84 rows=3 width=12) (actual time=0.469..0.597 rows=178 loops=1)

  • Recheck Cond: ((school_usr_id = su.school_usr_id) AND (school_id = 792))
  • Filter: (NOT deleted_yn)
  • Heap Blocks: exact=46
9. 0.004 0.459 ↓ 0.0 0 1

BitmapAnd (cost=471.50..471.50 rows=3 width=0) (actual time=0.459..0.459 rows=0 loops=1)

10. 0.029 0.029 ↑ 22.5 179 1

Bitmap Index Scan on timetable_idx1 (cost=0.00..45.12 rows=4,034 width=0) (actual time=0.029..0.029 rows=179 loops=1)

  • Index Cond: (school_usr_id = su.school_usr_id)
11. 0.426 0.426 ↑ 6.1 3,646 1

Bitmap Index Scan on timetable_idx8 (cost=0.00..420.55 rows=22,325 width=0) (actual time=0.426..0.426 rows=3,646 loops=1)

  • Index Cond: ((school_id = 792) AND (deleted_yn = false))
12. 0.356 0.356 ↓ 0.0 0 178

Index Scan using grade_details_idx on grade_details gd (cost=0.43..2.48 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=178)

  • Index Cond: (timetableid = tt.timetableid)
  • Filter: (('2020-07-30 10:13:02'::timestamp without time zone >= start_date) AND ('2020-07-30 10:13:02'::timestamp without time zone <= COALESCE(end_date, '2020-07-30 10:13:02'::timestamp without time zone)))
  • Rows Removed by Filter: 0
13. 0.078 0.078 ↑ 1.0 1 39

Index Scan using grd_users_pk on users u (cost=0.42..2.65 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=39)

  • Index Cond: (usr_id = 342,130)
  • Filter: (('2020-07-30 10:13:02'::timestamp without time zone >= start_date) AND ('2020-07-30 10:13:02'::timestamp without time zone <= COALESCE(end_date, '2020-07-30 10:13:02'::timestamp without time zone)))
14. 0.039 0.039 ↓ 0.0 0 39

Index Scan using grade_details_completed_idx on grade_details_completed gdc (cost=0.28..0.30 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=39)

  • Index Cond: (grade_details_id = gd.grade_details_id)
  • Filter: ((seen_at IS NULL) AND (completed_at < '2020-07-30 10:13:02.930049'::timestamp without time zone))
  • Rows Removed by Filter: 0