Sort (cost=2533.51..2533.53 rows=5 width=253) (actual time=435.412..435.416 rows=4 loops=1) Sort Key: "CH"."chargeNo", "CH"."chargeSeqNo" -> Hash Left Join (cost=2390.88..2533.46 rows=5 width=253) (actual time=435.254..435.327 rows=4 loops=1) Hash Cond: (("CH"."sevClsCode")::bpchar = ("S"."sevClsCode")::bpchar) -> Hash Left Join (cost=2389.34..2531.85 rows=5 width=219) (actual time=435.146..435.209 rows=4 loops=1) Hash Cond: (("CH"."modSevClsCode")::bpchar = ("M"."sevClsCode")::bpchar) -> Hash Left Join (cost=2387.80..2530.28 rows=5 width=185) (actual time=428.365..428.420 rows=4 loops=1) Hash Cond: (("CH"."pleaCode")::bpchar = ("PC"."pleaCode")::bpchar) -> Hash Left Join (cost=2386.57..2529.00 rows=5 width=146) (actual time=421.921..421.967 rows=4 loops=1) Hash Cond: ((("CHST"."eventType")::bpchar = ("CTHE"."eventType")::bpchar) AND (("CHST"."caseType")::bpchar = ("CTHE"."caseType")::bpchar)) -> Nested Loop Left Join (cost=0.00..122.50 rows=5 width=131) (actual time=4.777..4.814 rows=4 loops=1) -> Index Scan using "Charge_pkey" on "Charge" "CH" (cost=0.00..12.17 rows=5 width=112) (actual time=4.765..4.775 rows=4 loops=1) Index Cond: ((("countyNo")::smallint = 53) AND (("caseNo")::bpchar = '2007CM003476'::bpchar)) -> Index Scan using "CaseHist_pkey" on "CaseHist" "CHST" (cost=0.00..22.04 rows=2 width=41) (actual time=0.002..0.002 rows=0 loops=4) Index Cond: ((("CHST"."countyNo")::smallint = 53) AND (("CHST"."caseNo")::bpchar = '2007CM003476'::bpchar) AND (("CHST"."histSeqNo")::smallint = ("CH"."reopHistSeqNo")::smallint)) -> Hash (cost=2147.82..2147.82 rows=15917 width=98) (actual time=417.096..417.096 rows=15917 loops=1) -> Subquery Scan "CTHE" (cost=1684.48..2147.82 rows=15917 width=98) (actual time=293.804..388.572 rows=15917 loops=1) -> Merge Right Join (cost=1684.48..1988.65 rows=15917 width=89) (actual time=293.801..358.342 rows=15917 loops=1) Merge Cond: (((d."countyNo")::smallint = "inner"."?column9?") AND ((d."caseType")::bpchar = "inner"."?column10?") AND ((d."eventType")::bpchar = "inner"."?column11?")) -> Index Scan using "CaseTypeHistEventD_pkey" on "CaseTypeHistEventD" d (cost=0.00..89.64 rows=2066 width=21) (actual time=9.970..36.191 rows=1460 loops=1) -> Sort (cost=1684.48..1724.27 rows=15917 width=76) (actual time=255.997..271.497 rows=15917 loops=1) Sort Key: (c."countyNo")::smallint, (b."caseType")::bpchar, (b."eventType")::bpchar -> Nested Loop (cost=0.00..573.61 rows=15917 width=76) (actual time=9.941..88.116 rows=15917 loops=1) -> Index Scan using "ControlRecord_pkey" on "ControlRecord" c (cost=0.00..4.27 rows=1 width=2) (actual time=0.062..0.069 rows=1 loops=1) Index Cond: (("countyNo")::smallint = 53) -> Seq Scan on "CaseTypeHistEventB" b (cost=0.00..410.17 rows=15917 width=74) (actual time=9.871..45.731 rows=15917 loops=1) -> Hash (cost=1.10..1.10 rows=10 width=47) (actual time=6.413..6.413 rows=10 loops=1) -> Seq Scan on "PleaCode" "PC" (cost=0.00..1.10 rows=10 width=47) (actual time=6.383..6.394 rows=10 loops=1) -> Hash (cost=1.24..1.24 rows=24 width=40) (actual time=6.747..6.747 rows=24 loops=1) -> Seq Scan on "SevClsCode" "M" (cost=0.00..1.24 rows=24 width=40) (actual time=6.652..6.678 rows=24 loops=1) -> Hash (cost=1.24..1.24 rows=24 width=40) (actual time=0.081..0.081 rows=24 loops=1) -> Seq Scan on "SevClsCode" "S" (cost=0.00..1.24 rows=24 width=40) (actual time=0.004..0.030 rows=24 loops=1) Total runtime: 444.599 ms