explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TFxM

Settings
# exclusive inclusive rows x rows loops node
1. 49.921 75,428.071 ↑ 1.0 1 1

Aggregate (cost=703,541.74..703,541.75 rows=1 width=0) (actual time=75,428.071..75,428.071 rows=1 loops=1)

2. 120.897 75,378.150 ↓ 1.0 141,666 1

Hash Left Join (cost=221,585.12..703,203.04 rows=135,479 width=0) (actual time=3,665.440..75,378.150 rows=141,666 loops=1)

  • Hash Cond: ((eligibilities.program_id)::text = (scholarship_programs.scholarship_program_id)::text)
3. 223.963 75,256.456 ↓ 1.0 141,666 1

Nested Loop Left Join (cost=221,481.45..701,236.53 rows=135,479 width=25) (actual time=3,664.623..75,256.456 rows=141,666 loops=1)

  • Join Filter: ((hs_student_college.college_id)::text = (eligibilities.college_id)::text)
4. 606.191 61,857.555 ↓ 1.0 141,666 1

Hash Join (cost=221,480.89..526,263.13 rows=135,479 width=50) (actual time=3,664.149..61,857.555 rows=141,666 loops=1)

  • Hash Cond: ((hs_student_college.student_id)::text = (hs_students.id)::text)
5. 57,599.980 57,644.206 ↓ 1.0 141,971 1

Bitmap Heap Scan on hs_student_college (cost=4,347.97..290,350.09 rows=135,666 width=50) (actual time=49.594..57,644.206 rows=141,971 loops=1)

  • Recheck Cond: ((college_id)::text = '549902056e670ecd4e0002f1'::text)
  • Rows Removed by Index Recheck: 2744398
  • Heap Blocks: exact=29979 lossy=80149
6. 44.226 44.226 ↓ 1.0 141,971 1

Bitmap Index Scan on hs_student_college_college_id (cost=0.00..4,314.06 rows=135,666 width=0) (actual time=44.226..44.226 rows=141,971 loops=1)

  • Index Cond: ((college_id)::text = '549902056e670ecd4e0002f1'::text)
7. 921.730 3,607.158 ↑ 1.0 2,061,738 1

Hash (cost=177,259.86..177,259.86 rows=2,062,085 width=25) (actual time=3,607.158..3,607.158 rows=2,061,738 loops=1)

  • Buckets: 65536 Batches: 64 Memory Usage: 2319kB
8. 2,685.428 2,685.428 ↑ 1.0 2,061,738 1

Seq Scan on hs_students (cost=0.00..177,259.86 rows=2,062,085 width=25) (actual time=0.009..2,685.428 rows=2,061,738 loops=1)

  • Filter: ((country)::text = ANY ('{US,PW,MH,FM}'::text[]))
  • Rows Removed by Filter: 3544
9. 13,174.938 13,174.938 ↑ 1.0 1 141,666

Index Only Scan using eligibilities_college_student_program on eligibilities (cost=0.56..1.28 rows=1 width=75) (actual time=0.093..0.093 rows=1 loops=141,666)

  • Index Cond: ((college_id = '549902056e670ecd4e0002f1'::text) AND (student_id = (hs_students.id)::text))
  • Heap Fetches: 111066
10. 0.344 0.797 ↑ 1.0 652 1

Hash (cost=95.52..95.52 rows=652 width=25) (actual time=0.797..0.797 rows=652 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 45kB
11. 0.453 0.453 ↑ 1.0 652 1

Seq Scan on scholarship_programs (cost=0.00..95.52 rows=652 width=25) (actual time=0.004..0.453 rows=652 loops=1)