                                                                                                                                                                                                                                                                                                                                                             QUERY PLAN                                                                                                                                                                                                                                                                                                                                                             
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Aggregate  (cost=26166.99..26167.00 rows=1 width=8) (actual time=391386.247..391386.322 rows=1 loops=1)
   ->  Nested Loop Anti Join  (cost=1001.14..26166.97 rows=1 width=45) (actual time=543.859..391383.467 rows=499 loops=1)
         ->  Gather  (cost=1000.57..18838.10 rows=1 width=60) (actual time=0.433..1.328 rows=499 loops=1)
               Workers Planned: 2
               Workers Launched: 2
               ->  Parallel Index Scan using xif11sep_info_report_extract on sep_info_report_extract sire  (cost=0.57..17838.00 rows=1 width=60) (actual time=1.975..157.645 rows=166 loops=3)
                     Index Cond: ((reqt_processing_completed_dts >= $3) AND (reqt_processing_completed_dts <= (($4 + '1 day'::interval day) - '00:00:01'::interval second)))
                     Filter: (((reqt_failed_ind)::text <> '1'::text) AND ((reqxt_failed_ind IS NULL) OR ((reqxt_failed_ind)::text <> '1'::text)) AND ((resxt_failed_ind IS NULL) OR ((resxt_failed_ind)::text <> '1'::text)) AND ((reqtde_organization_type)::text <> 'SEW_EMPLOYER'::text) AND (req_valid_ind = '1'::numeric) AND (((res_valid_ind = '1'::numeric) AND ((rest_failed_ind)::text <> '1'::text)) OR ((res_valid_ind IS NULL) AND (rest_failed_ind IS NULL))) AND (reqte_endpoint_id = ($1)::numeric(38,0)) AND (reqtde_endpoint_id = ($2)::numeric(38,0)) AND ((rest_processing_completed_dts IS NOT NULL) OR (response_due_date < date_trunc('day'::text, timezone('America/New_York'::text, clock_timestamp())))))
                     Rows Removed by Filter: 162390
         ->  Index Scan using xif11sep_info_report_extract on sep_info_report_extract sire2  (cost=0.57..7328.86 rows=1 width=60) (actual time=784.327..784.327 rows=0 loops=499)
               Index Cond: ((reqt_processing_completed_dts < sire.reqt_processing_completed_dts) AND (reqt_processing_completed_dts >= ($3 - '35 days'::interval day)) AND (reqt_processing_completed_dts <= (($4 + '1 day'::interval day) - '00:00:01'::interval second)))
               Filter: ((rest_processing_completed_dts IS NOT NULL) AND ((reqt_failed_ind)::text <> '1'::text) AND ((reqxt_failed_ind IS NULL) OR ((reqxt_failed_ind)::text <> '1'::text)) AND ((rest_failed_ind)::text <> '1'::text) AND ((reqtde_organization_type)::text <> 'SEW_EMPLOYER'::text) AND (req_valid_ind = '1'::numeric) AND (res_valid_ind = '1'::numeric) AND (separation_request_id <> sire.separation_request_id) AND (reqte_endpoint_id = sire.reqte_endpoint_id) AND (reqtde_endpoint_id = sire.reqtde_endpoint_id) AND ((record_guid)::text = (sire.record_guid)::text) AND (reqte_endpoint_id = ($1)::numeric(38,0)) AND (reqtde_endpoint_id = ($2)::numeric(38,0)))
               Rows Removed by Filter: 832551
 Planning Time: 0.837 ms
 Execution Time: 391386.378 ms
(15 rows)

