"Nested Loop Left Join (cost=178818.14..281451.37 rows=1 width=116) (actual time=2956.605..23710.391 rows=296 loops=1)" " Join Filter: (s.aamc_id = ssd.aamc_id)" " Rows Removed by Join Filter: 60343611" " -> Nested Loop (cost=15253.88..113286.64 rows=1 width=114) (actual time=455.051..2166.571 rows=294 loops=1)" " -> Nested Loop (cost=15253.75..113286.48 rows=1 width=114) (actual time=455.022..2162.649 rows=294 loops=1)" " -> Nested Loop (cost=15253.61..113286.32 rows=1 width=100) (actual time=454.923..2158.974 rows=294 loops=1)" " -> Gather Merge (cost=15253.47..113286.16 rows=1 width=70) (actual time=454.902..2149.649 rows=300 loops=1)" " Workers Planned: 2" " Workers Launched: 2" " -> Nested Loop (cost=14253.45..112286.02 rows=1 width=70) (actual time=305.956..3499.198 rows=100 loops=3)" " Join Filter: (((max(student_status_detail.status_effective_dt)) = s.status_effective_dt) AND ((max(student_status_detail.last_updated_ts)) = s.last_updated_ts))" " Rows Removed by Join Filter: 75" " -> Merge Join (cost=14253.02..112226.44 rows=1 width=74) (actual time=305.846..3450.131 rows=100 loops=3)" " Merge Cond: (p.aamc_id = student_class_detail.aamc_id)" " -> Sort (cost=14252.59..14252.98 rows=155 width=34) (actual time=190.244..190.358 rows=103 loops=3)" " Sort Key: p.aamc_id" " Sort Method: quicksort Memory: 34kB" " Worker 0: Sort Method: quicksort Memory: 37kB" " Worker 1: Sort Method: quicksort Memory: 27kB" " -> Nested Loop (cost=1216.58..14246.96 rows=155 width=34) (actual time=6.285..190.076 rows=103 loops=3)" " Join Filter: (student_status_detail.aamc_id = p.aamc_id)" " -> Hash Join (cost=1216.15..14166.55 rows=150 width=22) (actual time=6.219..186.965 rows=103 loops=3)" " Hash Cond: (sdp.aamc_id = student_status_detail.aamc_id)" " -> Parallel Seq Scan on student_degree_program sdp (cost=0.00..12559.74 rows=148822 width=6) (actual time=0.025..156.520 rows=120430 loops=3)" " Filter: ((degree_program_type_cd)::text = '2'::text)" " Rows Removed by Filter: 240897" " -> Hash (cost=1211.45..1211.45 rows=376 width=16) (actual time=1.203..1.206 rows=309 loops=3)" " Buckets: 1024 Batches: 1 Memory Usage: 23kB" " -> HashAggregate (cost=1203.93..1207.69 rows=376 width=16) (actual time=1.053..1.123 rows=309 loops=3)" " Group Key: student_status_detail.aamc_id" " Batches: 1 Memory Usage: 61kB" " Worker 0: Batches: 1 Memory Usage: 61kB" " Worker 1: Batches: 1 Memory Usage: 61kB" " -> Bitmap Heap Scan on student_status_detail (cost=16.28..1201.11 rows=376 width=16) (actual time=0.157..0.857 rows=317 loops=3)" " Recheck Cond: ((institution_id = 159) AND ((academic_year)::text = '2001'::text))" " Heap Blocks: exact=303" " -> Bitmap Index Scan on uk_student_status_detail_institutionid_academicyear_aamcid_enro (cost=0.00..16.19 rows=376 width=0) (actual time=0.103..0.104 rows=317 loops=3)" " Index Cond: ((institution_id = 159) AND ((academic_year)::text = '2001'::text))" " -> Index Scan using pk_person on person p (cost=0.42..0.52 rows=1 width=12) (actual time=0.025..0.025 rows=1 loops=309)" " Index Cond: (aamc_id = sdp.aamc_id)" " Filter: ((record_deleted_ind)::text = 'N'::text)" " -> GroupAggregate (cost=0.43..97949.47 rows=1887 width=72) (actual time=0.181..3222.790 rows=282171 loops=3)" " Group Key: student_class_detail.aamc_id" " Filter: (max((student_class_detail.class_level_cd)::text) = '4'::text)" " Rows Removed by Filter: 76043" " -> Index Scan using uk_student_class_detail_aamcid_classlevelcd on student_class_detail (cost=0.43..80412.09 rows=1281972 width=14) (actual time=0.134..2394.544 rows=1272349 loops=3)" " Filter: (class_level_start_dt IS NOT NULL)" " Rows Removed by Filter: 160402" " -> Index Scan using uk_student_status_detail_institutionid_academicyear_aamcid_enro on student_status_detail s (cost=0.42..59.57 rows=1 width=32) (actual time=0.074..0.480 rows=2 loops=300)" " Index Cond: ((institution_id = 159) AND (aamc_id = p.aamc_id))" " -> Index Scan using pk_ref_enrollment_status on ref_enrollment_status res (cost=0.14..0.16 rows=1 width=33) (actual time=0.017..0.017 rows=1 loops=300)" " Index Cond: ((enrollment_status_cd)::text = (s.enrollment_status_cd)::text)" " Filter: ((active_ind)::text = ANY ('{Y,N}'::text[]))" " Rows Removed by Filter: 0" " -> Index Scan using pk_ref_medical_program_type on ref_medical_program_type rmpt (cost=0.14..0.15 rows=1 width=18) (actual time=0.004..0.004 rows=1 loops=294)" " Index Cond: ((medical_program_type_cd)::text = (sdp.medical_program_type_cd)::text)" " -> Index Only Scan using pk_ref_academic_year on ref_academic_year a (cost=0.14..0.16 rows=1 width=5) (actual time=0.005..0.005 rows=1 loops=294)" " Index Cond: (academic_year = (s.academic_year)::text)" " Heap Fetches: 294" " -> HashAggregate (cost=163564.26..164979.79 rows=141553 width=6) (actual time=8.403..60.930 rows=205251 loops=294)" " Group Key: ssd.aamc_id, rsr.is_allowed_ind" " Batches: 1 Memory Usage: 22545kB" " -> Hash Join (cost=69582.28..162856.49 rows=141553 width=6) (actual time=656.446..2221.194 rows=274942 loops=1)" " Hash Cond: (((ssd.enrollment_status_cd)::text = (rsr.enrollment_status_cd)::text) AND (((lag(ssd.enrollment_status_cd, 1) OVER (?)))::text = (rsr.next_status_cd)::text))" " -> WindowAgg (cost=69515.06..81562.10 rows=602352 width=43) (actual time=655.232..1896.467 rows=602352 loops=1)" " -> Sort (cost=69515.06..71020.94 rows=602352 width=11) (actual time=655.213..867.424 rows=602352 loops=1)" " Sort Key: ssd.aamc_id, ssd.status_effective_dt DESC" " Sort Method: external merge Disk: 12384kB" " -> Seq Scan on student_status_detail ssd (cost=0.00..11688.52 rows=602352 width=11) (actual time=0.010..203.799 rows=602352 loops=1)" " -> Hash (cost=34.09..34.09 rows=2209 width=8) (actual time=1.166..1.167 rows=2209 loops=1)" " Buckets: 4096 Batches: 1 Memory Usage: 119kB" " -> Seq Scan on ref_status_rule rsr (cost=0.00..34.09 rows=2209 width=8) (actual time=0.014..0.399 rows=2209 loops=1)" "Planning Time: 7.912 ms" "Execution Time: 23718.218 ms"