explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c24J

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Result (cost=991.04..1,008.00 rows=13 width=918) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=991.04..991.07 rows=13 width=1,495) (actual rows= loops=)

  • Sort Key: ((('now'::cstring)::date - ("CaseHist"."eventDate")::date)) DESC
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=48.54..990.80 rows=13 width=1,495) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=48.11..984.42 rows=13 width=939) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=47.25..959.10 rows=13 width=939) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=46.69..911.77 rows=20 width=943) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=46.41..905.82 rows=20 width=916) (actual rows= loops=)

  • Join Filter: ((("Case"."caseNo")::text = ("CaseHist"."caseNo")::text) AND ((('now'::cstring)::date - ("CaseHist"."eventDate")::date) >= "WCIS"."lastEventAgeLimit"))
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=45.84..884.05 rows=5 width=895) (actual rows= loops=)

  • Hash Cond: (("AgeOfCaseDetail"."periodSeqNo")::integer = ("SP"."periodSeqNo")::integer)
9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43.92..880.28 rows=147 width=899) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using "Ctofc_pkey" on "Ctofc" "Ctofc114" (cost=0.28..0.50 rows=1 width=416) (actual rows= loops=)

  • Index Cond: (("ctofcNo")::text = '2685'::text)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43.64..878.31 rows=147 width=483) (actual rows= loops=)

  • Join Filter: (("Case"."caseNo")::text = ("DocImageMetaData115"."caseNo")::text)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43.21..793.92 rows=51 width=63) (actual rows= loops=)

  • Join Filter: ("AgeOfCaseDetail"."ageOfCase" >= "WCIS"."caseAgeLimit")
13. 0.000 0.000 ↓ 0.0

Hash Join (cost=42.78..441.18 rows=363 width=46) (actual rows= loops=)

  • Hash Cond: ((("CaseType"."caseType")::text = ("WCIS"."caseType")::text) AND (("Case"."wcisClsCode")::text = ("WCIS"."wcisClsCode")::text))
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.58..335.72 rows=4,214 width=50) (actual rows= loops=)

  • Hash Cond: (("Case"."caseType")::text = ("CaseType"."caseType")::text)
15. 0.000 0.000 ↓ 0.0

Index Scan using "Case_respCtofcNo_countyNo" on "Case" (cost=0.43..282.16 rows=4,214 width=29) (actual rows= loops=)

  • Index Cond: ((("countyNo")::smallint = 13) AND (("respCtofcNo")::text = '2685'::text))
16. 0.000 0.000 ↓ 0.0

Hash (cost=0.57..0.57 rows=47 width=21) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on "CaseType" (cost=0.00..0.57 rows=47 width=21) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=17.98..17.98 rows=1,548 width=17) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on "WcisClsCode" "WCIS" (cost=0.00..17.98 rows=1,548 width=17) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Index Scan using "AgeOfCaseDetail_clockNotStopped" on "AgeOfCaseDetail" (cost=0.42..0.88 rows=7 width=23) (actual rows= loops=)

  • Index Cond: ((("caseNo")::text = ("Case"."caseNo")::text) AND (("countyNo")::smallint = 13))
21. 0.000 0.000 ↓ 0.0

Index Scan using "DocImageMetaData_filed" on "DocImageMetaData" "DocImageMetaData115" (cost=0.43..1.19 rows=37 width=420) (actual rows= loops=)

  • Index Cond: ((("caseNo")::text = ("AgeOfCaseDetail"."caseNo")::text) AND (("countyNo")::smallint = 13))
22. 0.000 0.000 ↓ 0.0

Hash (cost=1.86..1.86 rows=5 width=4) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using unique_periods on "StatPeriod" "SP" (cost=0.16..1.86 rows=5 width=4) (actual rows= loops=)

  • Index Cond: (((('now'::cstring)::date - 1) >= ("beginDate")::date) AND ((('now'::cstring)::date - 1) <= ("endDate")::date))
24. 0.000 0.000 ↓ 0.0

Index Scan using "CaseHist_pkey" on "CaseHist" (cost=0.56..2.35 rows=89 width=25) (actual rows= loops=)

  • Index Cond: ((("caseNo")::text = ("DocImageMetaData115"."caseNo")::text) AND (("countyNo")::smallint = 13))
25. 0.000 0.000 ↓ 0.0

Index Scan using "HistEvent_pkey" on "HistEvent" (cost=0.28..0.30 rows=1 width=35) (actual rows= loops=)

  • Index Cond: (("eventType")::text = ("CaseHist"."eventType")::text)
26. 0.000 0.000 ↓ 0.0

Index Scan using "CaseHist_pkey" on "CaseHist" "CH2" (cost=0.56..3.01 rows=30 width=21) (actual rows= loops=)

  • Index Cond: ((("caseNo")::text = ("CaseHist"."caseNo")::text) AND (("countyNo")::smallint = ("CaseHist"."countyNo")::smallint) AND (("countyNo")::smallint = 13))
  • Filter: (ROW(("eventDate")::date, ("histSeqNo")::smallint) > ROW(("CaseHist"."eventDate")::date, ("CaseHist"."histSeqNo")::smallint))
27. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..1.94 rows=1 width=15) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using "Cal_caseNoOnly" on "Cal" "Cal2" (cost=0.43..1.43 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (("caseNo")::text = ("Case"."caseNo")::text)
  • Filter: (("calDispoCode" IS NULL) AND (("countyNo")::smallint = 13) AND (("countyNo")::smallint = ("Case"."countyNo")::smallint))
29. 0.000 0.000 ↓ 0.0

Index Only Scan using "CalDate_range" on "CalDate" cd2 (cost=0.43..0.50 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (("calSeqNo" = ("Cal2"."calSeqNo")::integer) AND ("countyNo" = 13) AND (start >= ('now'::cstring)::date))
30. 0.000 0.000 ↓ 0.0

Index Scan using "Case_pkey" on "Case" "Case113" (cost=0.43..0.45 rows=1 width=468) (actual rows= loops=)

  • Index Cond: ((("caseNo")::text = ("CaseHist"."caseNo")::text) AND (("countyNo")::smallint = 13))