"Nested Loop Left Join (cost=196360.90..287890.45 rows=1 width=8) (actual time=3209.577..371300.693 rows=296 loops=1)" " Join Filter: (s.aamc_id = ssd.aamc_id)" " Rows Removed by Join Filter: 60348903" " -> Nested Loop (cost=15232.70..101055.49 rows=1 width=12) (actual time=470.584..2428.982 rows=294 loops=1)" " -> Nested Loop (cost=15232.56..101055.33 rows=1 width=17) (actual time=470.552..2424.584 rows=294 loops=1)" " -> Nested Loop (cost=15232.43..101055.17 rows=1 width=19) (actual time=470.532..2420.321 rows=294 loops=1)" " -> Gather Merge (cost=15232.29..101055.01 rows=1 width=20) (actual time=470.485..2411.475 rows=300 loops=1)" " Workers Planned: 2" " Workers Launched: 2" " -> Nested Loop (cost=14232.26..100054.87 rows=1 width=20) (actual time=433.720..3722.428 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=14231.84..99998.30 rows=1 width=32) (actual time=433.629..3680.031 rows=100 loops=3)" " Merge Cond: (p.aamc_id = student_class_detail.aamc_id)" " -> Sort (cost=14231.41..14231.79 rows=153 width=28) (actual time=188.132..188.268 rows=103 loops=3)" " Sort Key: p.aamc_id" " Sort Method: quicksort Memory: 38kB" " Worker 0: Sort Method: quicksort Memory: 27kB" " Worker 1: Sort Method: quicksort Memory: 33kB" " -> Nested Loop (cost=1192.00..14225.86 rows=153 width=28) (actual time=12.764..187.994 rows=103 loops=3)" " Join Filter: (student_status_detail.aamc_id = p.aamc_id)" " -> Hash Join (cost=1191.58..14146.71 rows=149 width=22) (actual time=12.691..186.193 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..12561.02 rows=150139 width=6) (actual time=0.028..151.578 rows=120438 loops=3)" " Filter: ((degree_program_type_cd)::text = '2'::text)" " Rows Removed by Filter: 240907" " -> Hash (cost=1186.98..1186.98 rows=368 width=16) (actual time=2.054..2.056 rows=309 loops=3)" " Buckets: 1024 Batches: 1 Memory Usage: 23kB" " -> HashAggregate (cost=1179.62..1183.30 rows=368 width=16) (actual time=1.860..1.935 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=12.20..1176.86 rows=368 width=16) (actual time=0.197..1.683 rows=317 loops=3)" " Recheck Cond: ((institution_id = 159) AND ((academic_year)::text = '2001'::text))" " Heap Blocks: exact=304" " -> Bitmap Index Scan on uk_student_status_detail_institutionid_academicyear_aamcid_enro (cost=0.00..12.11 rows=368 width=0) (actual time=0.122..0.123 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=6) (actual time=0.013..0.013 rows=1 loops=309)" " Index Cond: (aamc_id = sdp.aamc_id)" " Filter: ((record_deleted_ind)::text = 'N'::text)" " -> GroupAggregate (cost=0.43..85743.24 rows=1830 width=72) (actual time=1.621..3452.034 rows=282179 loops=3)" " Group Key: student_class_detail.aamc_id" " Filter: (max((student_class_detail.class_level_cd)::text) = '4'::text)" " Rows Removed by Filter: 76060" " -> Index Scan using uk_student_class_detail_aamcid_classlevelcd on student_class_detail (cost=0.43..74747.61 rows=1284079 width=6) (actual time=1.570..2723.014 rows=1272390 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..56.55 rows=1 width=28) (actual time=0.055..0.412 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=5) (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 Only Scan using pk_ref_medical_program_type on ref_medical_program_type rmpt (cost=0.14..0.15 rows=1 width=2) (actual time=0.006..0.006 rows=1 loops=294)" " Index Cond: (medical_program_type_cd = (sdp.medical_program_type_cd)::text)" " Heap Fetches: 294" " -> 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.006..0.006 rows=1 loops=294)" " Index Cond: (academic_year = (s.academic_year)::text)" " Heap Fetches: 294" " -> HashAggregate (cost=181128.20..183649.79 rows=141563 width=6) (actual time=1131.677..1235.378 rows=205269 loops=294)" " Group Key: ssd.aamc_id, rsr.is_allowed_ind" " Planned Partitions: 4 Batches: 1177 Memory Usage: 4145kB Disk Usage: 7280kB" " -> Hash Join (cost=79884.26..173165.28 rows=141563 width=6) (actual time=339.481..1021.444 rows=274965 loops=294)" " 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=79817.04..91864.96 rows=602396 width=43) (actual time=339.465..889.700 rows=602396 loops=294)" " -> Sort (cost=79817.04..81323.03 rows=602396 width=11) (actual time=339.449..466.022 rows=602396 loops=294)" " Sort Key: ssd.aamc_id, ssd.status_effective_dt DESC" " Sort Method: external merge Disk: 12416kB" " -> Seq Scan on student_status_detail ssd (cost=0.00..11688.96 rows=602396 width=11) (actual time=0.017..114.151 rows=602396 loops=294)" " -> Hash (cost=34.09..34.09 rows=2209 width=8) (actual time=1.058..1.059 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.011..0.434 rows=2209 loops=1)" "Planning Time: 10.794 ms" "Execution Time: 371307.301 ms"