QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Unique (cost=473.48..473.57 rows=2 width=173) -> Sort (cost=473.48..473.49 rows=2 width=173) Sort Key: "caseNo", "filingDate", "countyName", "statusCodeDescr", "nameF", "nameM", "nameL", suffix, dob, caption, "countyNo", "caseType", "isSeal", "isPartySeal", "lastModified", "searchName", "isPetitionerSeal" -> Append (cost=0.00..473.47 rows=2 width=173) -> Subquery Scan "*SELECT* 1" (cost=0.00..235.74 rows=1 width=169) -> Nested Loop (cost=0.00..235.73 rows=1 width=169) -> Nested Loop (cost=0.00..126.19 rows=1 width=163) -> Nested Loop Left Join (cost=0.00..124.31 rows=1 width=153) -> Nested Loop Left Join (cost=0.00..120.71 rows=1 width=153) -> Nested Loop Left Join (cost=0.00..117.82 rows=1 width=145) Filter: ((("WPCT"."profileName" IS NOT NULL) OR ((("C"."caseType")::text = ANY (('{PA,JD}'::character varying[])::text[])) AND (NOT "C"."isConfidential"))) AND ((("WPCT"."profileName")::text <> 'PUBLIC'::text) OR (("C"."caseType")::text <> 'FA'::text) OR (("C"."wcisClsCode")::text <> '40501'::text))) -> Nested Loop (cost=0.00..117.50 rows=1 width=146) Join Filter: ((((("P"."partyType")::text = ANY (('{JV,CH}'::character varying[])::text[])) AND (("C"."caseType")::text = 'ZZ'::text)) OR (("P"."partyType")::text <> ALL (('{JV,CH}'::character varying[])::text[]))) AND ((("C"."caseType")::text <> ALL (('{CF,CI,CM,CT,FO,TR}'::character varying[])::text[])) OR (("P"."partyType")::text = 'DE'::text)) AND (((("C"."caseType")::text = ANY (('{JA,JC,JG,JM,JO,JV,JI,TP}'::character varying[])::text[])) AND (("P"."partyType")::text = ANY (('{CH,JV}'::character varying[])::text[]))) OR ((("C"."caseType")::text <> ALL (('{JA,JC,JG,JM,JO,JV,JI,TP}'::character varying[])::text[])) AND (("P"."partyType")::text <> ALL (('{CH,JV}'::character varying[])::text[])))) AND ((("P"."partyType")::text <> ALL (('{PE,PL,JP}'::character varying[])::text[])) OR (((("C"."filingDate")::date < '2008-11-01'::date) OR (("C"."wcisClsCode")::text <> '30709'::text)) AND ((("C"."caseType")::text <> ALL (('{CV,FA}'::character varying[])::text[])) OR (("C"."wcisClsCode")::text <> '30711'::text) OR (NOT (subplan)))))) -> Index Scan using "Party_SearchName" on "Party" "P" (cost=0.00..3.21 rows=1 width=81) Index Cond: ((("searchName")::text >= 'HILL,J'::character varying) AND (("searchName")::text < 'HILL,K'::character varying)) Filter: ((NOT "isSeal") AND (("searchName")::text ~~ 'HILL,J%'::text)) -> Index Scan using "Case_pkey" on "Case" "C" (cost=0.00..4.96 rows=1 width=87) Index Cond: ((("C"."countyNo")::smallint = ("P"."countyNo")::smallint) AND (("C"."caseNo")::text = ("P"."caseNo")::text)) Filter: (("isExpunge" <> true) AND (NOT (subplan))) SubPlan -> Index Scan using "HiddenCase_pkey" on "HiddenCase" "HCA" (cost=0.00..2.14 rows=1 width=0) Index Cond: ((("countyNo")::smallint = ($0)::smallint) AND (("caseNo")::text = ($1)::text)) SubPlan -> Index Scan using "CaseHist_pkey" on "CaseHist" "CHPET" (cost=0.00..109.25 rows=1 width=0) Index Cond: ((($0)::smallint = ("countyNo")::smallint) AND (($1)::text = ("caseNo")::text)) Filter: (("eventType")::text = ANY (('{FWBCA,CCTRO}'::character varying[])::text[])) -> Index Scan using "WccaPermCaseType_ProfileName" on "WccaPermCaseType" "WPCT" (cost=0.00..0.29 rows=1 width=32) Index Cond: ((("WPCT"."profileName")::text = 'PUBLIC'::text) AND (("C"."caseType")::text = ("WPCT"."caseType")::text) AND (("C"."countyNo")::smallint = ("WPCT"."countyNo")::smallint)) -> Index Scan using "LastCaseMod_pkey" on "LastCaseMod" "LCM" (cost=0.00..2.87 rows=1 width=26) Index Cond: ((("LCM"."countyNo")::smallint = ("C"."countyNo")::smallint) AND (("LCM"."caseNo")::text = ("C"."caseNo")::text) AND (("LCM"."updateTypeId")::integer = 0)) -> Index Scan using "CaseDispo_pkey" on "CaseDispo" "CD" (cost=0.00..3.59 rows=1 width=18) Index Cond: ((("CD"."countyNo")::smallint = ("C"."countyNo")::smallint) AND (("CD"."caseNo")::text = ("C"."caseNo")::text)) Filter: (NOT (subplan)) SubPlan -> Index Scan using "CaseDispo_pkey" on "CaseDispo" "CD2" (cost=0.00..2.58 rows=1 width=0) Index Cond: ((("countyNo")::smallint = ($11)::smallint) AND (("caseNo")::text = ($10)::text) AND (("dispoDate")::date > ($12)::date)) -> Index Scan using "County_pkey" on "County" "CY" (cost=0.00..1.87 rows=1 width=12) Index Cond: (("C"."countyNo")::smallint = ("CY"."countyNo")::smallint) -> Index Scan using "StatusCode_pkey" on "StatusCode" "S" (cost=0.00..0.27 rows=1 width=18) Index Cond: (("C"."statusCode")::text = ("S"."statusCode")::text) SubPlan -> Index Scan using "CaseHist_pkey" on "CaseHist" "CH" (cost=0.00..109.25 rows=1 width=0) Index Cond: ((($0)::smallint = ("countyNo")::smallint) AND (($1)::text = ("caseNo")::text)) Filter: (("eventType")::text = ANY (('{FWBCA,CCTRO}'::character varying[])::text[])) -> Subquery Scan "*SELECT* 2" (cost=0.00..237.73 rows=1 width=173) -> Nested Loop (cost=0.00..237.72 rows=1 width=173) -> Nested Loop (cost=0.00..128.18 rows=1 width=167) -> Nested Loop (cost=0.00..126.30 rows=1 width=159) Join Filter: ((((("P"."partyType")::text = ANY (('{JV,CH}'::character varying[])::text[])) AND (("C"."caseType")::text = 'ZZ'::text)) OR (("P"."partyType")::text <> ALL (('{JV,CH}'::character varying[])::text[]))) AND ((("C"."caseType")::text <> ALL (('{CF,CI,CM,CT,FO,TR}'::character varying[])::text[])) OR (("P"."partyType")::text = 'DE'::text)) AND (((("C"."caseType")::text = ANY (('{JA,JC,JG,JM,JO,JV,JI,TP}'::character varying[])::text[])) AND (("P"."partyType")::text = ANY (('{CH,JV}'::character varying[])::text[]))) OR ((("C"."caseType")::text <> ALL (('{JA,JC,JG,JM,JO,JV,JI,TP}'::character varying[])::text[])) AND (("P"."partyType")::text <> ALL (('{CH,JV}'::character varying[])::text[])))) AND ((("P"."partyType")::text <> ALL (('{PE,PL,JP}'::character varying[])::text[])) OR (((("C"."filingDate")::date < '2008-11-01'::date) OR (("C"."wcisClsCode")::text <> '30709'::text)) AND ((("C"."caseType")::text <> ALL (('{CV,FA}'::character varying[])::text[])) OR (("C"."wcisClsCode")::text <> '30711'::text) OR (NOT (subplan)))))) -> Nested Loop Left Join (cost=0.00..13.77 rows=1 width=175) -> Nested Loop Left Join (cost=0.00..10.88 rows=1 width=167) -> Nested Loop Left Join (cost=0.00..7.28 rows=1 width=167) Filter: ((("WPCT"."profileName" IS NOT NULL) OR ((("C"."caseType")::text = ANY (('{PA,JD}'::character varying[])::text[])) AND (NOT "C"."isConfidential"))) AND ((("WPCT"."profileName")::text <> 'PUBLIC'::text) OR (("C"."caseType")::text <> 'FA'::text) OR (("C"."wcisClsCode")::text <> '40501'::text))) -> Nested Loop (cost=0.00..6.96 rows=1 width=168) -> Index Scan using "Alias_SearchName" on "Alias" "AL" (cost=0.00..1.99 rows=1 width=81) Index Cond: ((("searchName")::text >= 'HILL,J'::character varying) AND (("searchName")::text < 'HILL,K'::character varying)) Filter: (("searchName")::text ~~ 'HILL,J%'::text) -> Index Scan using "Case_pkey" on "Case" "C" (cost=0.00..4.96 rows=1 width=87) Index Cond: ((("C"."countyNo")::smallint = ("AL"."countyNo")::smallint) AND (("AL"."caseNo")::text = ("C"."caseNo")::text)) Filter: (("isExpunge" <> true) AND (NOT (subplan))) SubPlan -> Index Scan using "HiddenCase_pkey" on "HiddenCase" "HCA" (cost=0.00..2.14 rows=1 width=0) Index Cond: ((("countyNo")::smallint = ($0)::smallint) AND (("caseNo")::text = ($1)::text)) -> Index Scan using "WccaPermCaseType_ProfileName" on "WccaPermCaseType" "WPCT" (cost=0.00..0.29 rows=1 width=32) Index Cond: ((("WPCT"."profileName")::text = 'PUBLIC'::text) AND (("C"."caseType")::text = ("WPCT"."caseType")::text) AND (("C"."countyNo")::smallint = ("WPCT"."countyNo")::smallint)) -> Index Scan using "CaseDispo_pkey" on "CaseDispo" "CD" (cost=0.00..3.59 rows=1 width=18) Index Cond: ((("CD"."countyNo")::smallint = ("C"."countyNo")::smallint) AND (("CD"."caseNo")::text = ("C"."caseNo")::text)) Filter: (NOT (subplan)) SubPlan -> Index Scan using "CaseDispo_pkey" on "CaseDispo" "CD2" (cost=0.00..2.58 rows=1 width=0) Index Cond: ((("countyNo")::smallint = ($4)::smallint) AND (("caseNo")::text = ($3)::text) AND (("dispoDate")::date > ($5)::date)) -> Index Scan using "LastCaseMod_pkey" on "LastCaseMod" "LCM" (cost=0.00..2.87 rows=1 width=26) Index Cond: ((("LCM"."countyNo")::smallint = ("C"."countyNo")::smallint) AND (("LCM"."caseNo")::text = ("C"."caseNo")::text) AND (("LCM"."updateTypeId")::integer = 0)) -> Index Scan using "Party_pkey" on "Party" "P" (cost=0.00..3.19 rows=1 width=26) Index Cond: ((("C"."countyNo")::smallint = ("P"."countyNo")::smallint) AND (("C"."caseNo")::text = ("P"."caseNo")::text) AND (("P"."partyNo")::smallint = ("AL"."partyNo")::smallint)) Filter: (NOT "isSeal") SubPlan -> Index Scan using "CaseHist_pkey" on "CaseHist" "CHPET" (cost=0.00..109.25 rows=1 width=0) Index Cond: ((($0)::smallint = ("countyNo")::smallint) AND (($1)::text = ("caseNo")::text)) Filter: (("eventType")::text = ANY (('{FWBCA,CCTRO}'::character varying[])::text[])) -> Index Scan using "County_pkey" on "County" "CY" (cost=0.00..1.87 rows=1 width=12) Index Cond: (("C"."countyNo")::smallint = ("CY"."countyNo")::smallint) -> Index Scan using "StatusCode_pkey" on "StatusCode" "S" (cost=0.00..0.27 rows=1 width=18) Index Cond: (("C"."statusCode")::text = ("S"."statusCode")::text) SubPlan -> Index Scan using "CaseHist_pkey" on "CaseHist" "CH" (cost=0.00..109.25 rows=1 width=0) Index Cond: ((($0)::smallint = ("countyNo")::smallint) AND (($1)::text = ("caseNo")::text)) Filter: (("eventType")::text = ANY (('{FWBCA,CCTRO}'::character varying[])::text[])) (88 rows)