explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LLdc

Settings
# exclusive inclusive rows x rows loops node
1. 16.588 2,339.113 ↑ 5.6 19,666 1

Gather (cost=9,541.89..74,234.92 rows=109,675 width=24) (actual time=126.263..2,339.113 rows=19,666 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1,864.583 2,322.525 ↑ 7.0 6,555 3

Nested Loop Left Join (cost=8,541.89..62,267.42 rows=45,698 width=24) (actual time=107.281..2,322.525 rows=6,555 loops=3)

3. 129.987 457.660 ↑ 7.0 6,555 3

Hash Join (cost=8,541.47..36,945.27 rows=45,698 width=32) (actual time=107.251..457.660 rows=6,555 loops=3)

  • Hash Cond: (course_enrollment.class_section_id = course_classsection.id)
4. 220.515 220.515 ↑ 1.3 412,026 3

Parallel Seq Scan on course_enrollment (cost=0.00..26,015.37 rows=515,056 width=24) (actual time=0.007..220.515 rows=412,026 loops=3)

  • Filter: (archived_time IS NULL)
  • Rows Removed by Filter: 18078
5. 0.757 107.158 ↑ 5.0 1,605 3

Hash (cost=8,441.19..8,441.19 rows=8,022 width=8) (actual time=107.158..107.158 rows=1,605 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 127kB
6. 32.249 106.401 ↑ 5.0 1,605 3

Hash Join (cost=4,659.79..8,441.19 rows=8,022 width=8) (actual time=15.410..106.401 rows=1,605 loops=3)

  • Hash Cond: (course_classsection.course_id = course_course.id)
7. 61.103 61.103 ↓ 1.0 74,429 3

Seq Scan on course_classsection (cost=0.00..3,586.17 rows=74,365 width=8) (actual time=0.009..61.103 rows=74,429 loops=3)

  • Filter: (archived_time IS NULL)
  • Rows Removed by Filter: 16204
8. 4.318 13.049 ↑ 1.7 2,749 3

Hash (cost=4,599.69..4,599.69 rows=4,808 width=4) (actual time=13.049..13.049 rows=2,749 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 161kB
9. 8.041 8.731 ↑ 1.7 2,749 3

Bitmap Heap Scan on course_course (cost=158.00..4,599.69 rows=4,808 width=4) (actual time=2.330..8.731 rows=2,749 loops=3)

  • Recheck Cond: (school_id = 1194)
  • Filter: (archived_time IS NULL)
  • Rows Removed by Filter: 3183
  • Heap Blocks: exact=2505
10. 0.690 0.690 ↓ 1.0 5,938 3

Bitmap Index Scan on course_course_school_id (cost=0.00..156.80 rows=5,935 width=0) (actual time=0.689..0.690 rows=5,938 loops=3)

  • Index Cond: (school_id = 1194)
11. 0.282 0.282 ↑ 1.0 1 19,666

Index Scan using course_classschedule_cb_class_id_key on course_classschedule (cost=0.43..0.55 rows=1 width=16) (actual time=0.282..0.282 rows=1 loops=19,666)

  • Index Cond: ((course_enrollment.class_section_id = class_section_id) AND (course_enrollment.user_id = user_id))
Planning time : 1.069 ms
Execution time : 2,344.103 ms