explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wxkd

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

Sort (cost=901,151.91..901,152.17 rows=105 width=356) (actual rows= loops=)

  • Sort Key: ts.startdate, ts.enddate, ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", ((ui.displayname)::text) COLLATE "en_US", "*SELECT* 1".entrydate, "*SELECT* 1".modifiedonutc, "*SELECT* 1".action, "*SELECT* 1".validuntilutc, ui.id, ts.id
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.82..901,148.38 rows=105 width=356) (actual rows= loops=)

  • Join Filter: ("*SELECT* 1".userid = ui.id)
3. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui (cost=0.00..96.70 rows=2,370 width=33) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Materialize (cost=1.82..897,319.20 rows=105 width=118) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.82..897,318.67 rows=105 width=118) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.40..897,270.99 rows=105 width=126) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Append (cost=0.98..897,100.05 rows=105 width=110) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=0.98..24.61 rows=1 width=80) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..24.60 rows=1 width=348) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.54..21.28 rows=1 width=60) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.12..12.65 rows=1 width=44) (actual rows= loops=)

  • Join Filter: (at.rootid = allocatedtime.rootid)
12. 0.000 0.000 ↓ 0.0

Seq Scan on allocatedtime at (cost=0.00..10.50 rows=1 width=60) (actual rows= loops=)

  • Filter: ((fromtimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-09-03 04:00:00'::timestamp without time zone) AND (CASE WHEN (parentid IS NULL) THEN 100 ELSE 101 END = ANY ('{1,2,3,4,6,100,101,102}'::integer[])))
13. 0.000 0.000 ↓ 0.0

Index Only Scan using ixallocatedtimerootid on allocatedtime (cost=0.12..2.14 rows=1 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_1 (cost=0.42..8.56 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = at.userid) AND (at.entrydate >= startdate) AND (at.entrydate <= enddate))
15. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot tsformat (cost=0.43..3.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_1.id)
  • Filter: ((upper(uri) <> 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text) AND (upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text))
16. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.57..21.11 rows=1 width=80) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Result (cost=0.57..21.10 rows=1 width=348) (actual rows= loops=)

  • One-Time Filter: (102 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..21.10 rows=1 width=348) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.14..12.46 rows=1 width=20) (actual rows= loops=)

  • Filter: (child_at.id IS NULL)
20. 0.000 0.000 ↓ 0.0

Seq Scan on allocatedtime at_1 (cost=0.00..10.30 rows=1 width=36) (actual rows= loops=)

  • Filter: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
21. 0.000 0.000 ↓ 0.0

Index Scan using uixallocatedtime_parent on allocatedtime child_at (cost=0.14..2.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = at_1.id)
22. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_2 (cost=0.42..8.56 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = at_1.userid) AND (at_1.entrydate >= startdate) AND (at_1.entrydate <= enddate))
23. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=3,874.71..10,567.41 rows=84 width=110) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Gather (cost=3,874.71..10,566.57 rows=84 width=378) (actual rows= loops=)

  • Workers Planned: 1
25. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,874.71..9,558.17 rows=49 width=378) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,874.02..9,444.04 rows=42 width=134) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,873.34..9,343.49 rows=37 width=72) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=2,872.65..9,242.94 rows=37 width=72) (actual rows= loops=)

  • Hash Cond: (ts_3.id = timesheetpolicysettingssnapshot.timesheetid)
29. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..6,351.17 rows=1,879 width=72) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixter2fromtimestamputc on timeentryrevision rev (cost=0.56..5,062.70 rows=254 width=56) (actual rows= loops=)

  • Index Cond: ((fromtimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
  • Filter: (CASE WHEN (previousrevisionid IS NULL) THEN 100 ELSE 101 END = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
31. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_3 (cost=0.42..5.00 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev.userid) AND (rev.entrydate >= startdate) AND (rev.entrydate <= enddate))
32. 0.000 0.000 ↓ 0.0

Hash (cost=2,837.31..2,837.31 rows=2,749 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot (cost=0.68..2,837.31 rows=2,749 width=16) (actual rows= loops=)

  • Index Cond: ((upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text) AND (upper(uri) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text))
34. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue changereason (cost=0.69..2.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:COMMENT'::text))
35. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser (cost=0.69..2.71 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
36. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser (cost=0.69..2.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
37. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=1,003.66..39,023.28 rows=1 width=110) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Result (cost=1,003.66..39,023.27 rows=1 width=378) (actual rows= loops=)

  • One-Time Filter: (101 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
39. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1,003.66..39,023.27 rows=1 width=378) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,003.22..39,019.95 rows=1 width=102) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.53..39,017.29 rows=1 width=118) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,001.84..39,014.64 rows=1 width=56) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,001.42..39,013.83 rows=1 width=40) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.99..39,010.14 rows=1 width=48) (actual rows= loops=)

  • Workers Planned: 1
45. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=0.99..38,010.04 rows=1 width=48) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev (cost=0.56..10,717.75 rows=13,444 width=48) (actual rows= loops=)

  • Index Cond: ((fromtimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
47. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_singleinitialrevision on timeentryrevision (cost=0.43..2.02 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timeentryid = mdrev.timeentryid)
  • Filter: (fromtimestamputc = mdrev.fromtimestamputc)
48. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_1 (cost=0.43..3.68 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = mdrev.timeentryid)
  • Filter: ((fromtimestamputc <= mdrev.fromtimestamputc) AND ((totimestamputc IS NULL) OR (totimestamputc > mdrev.fromtimestamputc)))
49. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_4 (cost=0.42..0.74 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev_1.userid) AND (rev_1.entrydate >= startdate) AND (rev_1.entrydate <= enddate))
50. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_1 (cost=0.69..2.64 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = mdrev.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
51. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_1 (cost=0.69..2.64 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = mdrev.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
52. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_1 (cost=0.43..3.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_4.id)
  • Filter: ((upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text) AND (upper(uri) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text))
53. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=4.66..593,007.61 rows=14 width=110) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Result (cost=4.66..593,007.47 rows=14 width=378) (actual rows= loops=)

  • One-Time Filter: (101 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
55. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=4.66..593,007.47 rows=14 width=378) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.79..592,937.63 rows=14 width=110) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.10..592,905.02 rows=12 width=126) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=2.41..592,880.57 rows=9 width=64) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.85..592,597.09 rows=11 width=124) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.42..590,758.72 rows=556 width=124) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..590,697.95 rows=75 width=108) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev_1 (cost=0.56..590,165.77 rows=118 width=100) (actual rows= loops=)

  • Index Cond: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
63. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_2 (cost=0.43..4.50 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = mdrev_1.timeentryid)
  • Filter: ((fromtimestamputc <= mdrev_1.totimestamputc) AND ((totimestamputc IS NULL) OR (totimestamputc > mdrev_1.totimestamputc)))
64. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_5 (cost=0.42..0.74 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev_2.userid) AND (rev_2.entrydate >= startdate) AND (rev_2.entrydate <= enddate))
65. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_2 (cost=0.43..3.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_5.id)
  • Filter: ((upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text) AND (upper(uri) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text))
66. 0.000 0.000 ↓ 0.0

Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision (cost=0.56..25.76 rows=1 width=84) (actual rows= loops=)

  • Index Cond: (fromtimestamputc = mdrev_1.totimestamputc)
  • Filter: ((timeentryid = mdrev_1.timeentryid) AND (key = mdrev_1.key) AND (openingauditid = mdrev_1.closingauditid))
67. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_2 (cost=0.69..2.71 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = mdrev_1.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
68. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_2 (cost=0.69..2.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = mdrev_1.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
69. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.86..4.98 rows=1 width=24) (actual rows= loops=)

  • Filter: (child_rev.id IS NULL)
70. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_1_1 (cost=0.43..4.49 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = mdrev_1.timeentryid)
  • Filter: (totimestamputc = mdrev_1.totimestamputc)
71. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_uniquepreviousrevisionid on timeentryrevision child_rev (cost=0.43..0.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (previousrevisionid = rev_1_1.id)
72. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 6 (cost=3.52..80.48 rows=1 width=110) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Result (cost=3.52..80.47 rows=1 width=378) (actual rows= loops=)

  • One-Time Filter: (101 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
74. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=3.52..80.47 rows=1 width=378) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.08..77.14 rows=1 width=102) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.39..74.43 rows=1 width=118) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.70..71.71 rows=1 width=56) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.28..70.90 rows=1 width=40) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=0.85..66.39 rows=1 width=48) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Index Scan using ixoefvr2fromtimestamputc on objectextensionfieldvaluerevision oefvr (cost=0.42..12.27 rows=22 width=48) (actual rows= loops=)

  • Index Cond: ((fromtimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
81. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_singleinitialrevision on timeentryrevision timeentryrevision_1 (cost=0.43..2.45 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timeentryid = oefvr.objectid)
  • Filter: (fromtimestamputc = oefvr.fromtimestamputc)
82. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_3 (cost=0.43..4.50 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = oefvr.objectid)
  • Filter: ((fromtimestamputc <= oefvr.fromtimestamputc) AND ((totimestamputc IS NULL) OR (totimestamputc > oefvr.fromtimestamputc)))
83. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_6 (cost=0.42..0.74 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev_3.userid) AND (rev_3.entrydate >= startdate) AND (rev_3.entrydate <= enddate))
84. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_3 (cost=0.69..2.71 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = oefvr.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
85. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_3 (cost=0.69..2.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = oefvr.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
86. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_3 (cost=0.43..3.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_6.id)
  • Filter: ((upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text) AND (upper(uri) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text))
87. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 7 (cost=4.38..3,339.07 rows=1 width=110) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Result (cost=4.38..3,339.06 rows=1 width=378) (actual rows= loops=)

  • One-Time Filter: (101 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
89. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=4.38..3,339.06 rows=1 width=378) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=3.50..3,334.06 rows=1 width=110) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.08..3,331.60 rows=1 width=142) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.39..3,328.89 rows=1 width=158) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.71..3,326.17 rows=1 width=96) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..3,300.15 rows=7 width=96) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..3,299.34 rows=1 width=80) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Index Scan using ixoefvr2fromtimestamputc on objectextensionfieldvaluerevision oefvr_1 (cost=0.42..3,294.83 rows=1 width=72) (actual rows= loops=)

  • Index Cond: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
97. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_4 (cost=0.43..4.50 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = oefvr_1.objectid)
  • Filter: ((fromtimestamputc <= oefvr_1.totimestamputc) AND ((totimestamputc IS NULL) OR (totimestamputc > oefvr_1.totimestamputc)))
98. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_7 (cost=0.42..0.74 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev_4.userid) AND (rev_4.entrydate >= startdate) AND (rev_4.entrydate <= enddate))
99. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_4 (cost=0.43..3.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_7.id)
  • Filter: ((upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text) AND (upper(uri) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT:GEN4-TIMESHEET'::text))
100. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_4 (cost=0.69..2.71 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = oefvr_1.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
101. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_4 (cost=0.69..2.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = oefvr_1.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
102. 0.000 0.000 ↓ 0.0

Index Scan using ixoefvrobjectid on objectextensionfieldvaluerevision (cost=0.42..2.45 rows=1 width=56) (actual rows= loops=)

  • Index Cond: (objectid = oefvr_1.objectid)
  • Filter: ((definitionid = oefvr_1.definitionid) AND (fromtimestamputc = oefvr_1.totimestamputc) AND (openingauditid = oefvr_1.closingauditid))
103. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.86..4.98 rows=1 width=24) (actual rows= loops=)

  • Filter: (child_rev_1.id IS NULL)
104. 0.000 0.000 ↓ 0.0

Index Scan using ixtertimeentryid on timeentryrevision rev_1_2 (cost=0.43..4.49 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (timeentryid = oefvr_1.objectid)
  • Filter: (totimestamputc = oefvr_1.totimestamputc)
105. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_uniquepreviousrevisionid on timeentryrevision child_rev_1 (cost=0.43..0.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (previousrevisionid = rev_1_2.id)
106. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 8 (cost=1,002.92..189,062.49 rows=1 width=110) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Result (cost=1,002.92..189,062.48 rows=1 width=378) (actual rows= loops=)

  • One-Time Filter: (102 = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
108. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.92..189,062.48 rows=1 width=378) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.23..189,059.76 rows=1 width=110) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,001.54..189,057.05 rows=1 width=110) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,000.85..189,054.33 rows=1 width=48) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.43..189,052.29 rows=1 width=32) (actual rows= loops=)

  • Workers Planned: 2
113. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.43..188,052.19 rows=1 width=32) (actual rows= loops=)

  • Filter: (child_rev_2.id IS NULL)
114. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on timeentryrevision rev_5 (cost=0.00..186,148.05 rows=782 width=48) (actual rows= loops=)

  • Filter: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-09-03 04:00:00'::timestamp without time zone))
115. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_uniquepreviousrevisionid on timeentryrevision child_rev_2 (cost=0.43..2.42 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (previousrevisionid = rev_5.id)
116. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_8 (cost=0.42..1.98 rows=7 width=28) (actual rows= loops=)

  • Index Cond: ((userid = rev_5.userid) AND (rev_5.entrydate >= startdate) AND (rev_5.entrydate <= enddate))
117. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_5 (cost=0.69..2.70 rows=1 width=78) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev_5.closingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
118. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_5 (cost=0.69..2.70 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev_5.closingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
119. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue changereason_1 (cost=0.69..2.70 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev_5.closingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:COMMENT'::text))
120. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 9 (cost=43,626.97..61,973.98 rows=1 width=119) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=43,626.97..61,973.97 rows=1 width=387) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=43,626.53..61,939.81 rows=1 width=119) (actual rows= loops=)

123. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43,626.10..61,905.63 rows=1 width=48) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43,625.67..61,902.57 rows=1 width=64) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=43,625.25..61,900.13 rows=1 width=44) (actual rows= loops=)

  • Index Cond: (action = ANY ('{1,2,3,4,6,100,101,102}'::integer[]))
  • Filter: ((NOT (hashed SubPlan 3)) AND (timestamputc >= '2020-09-02 04:00:00'::timestamp without time zone) AND (timestamputc < '2020-09-03 04:00:00'::timestamp without time zone) AND (COALESCE(upper(systemprocessidentifier), ''::text) <> 'URN:REPLICON:APPROVAL-SYSTEM-PROCESS:TIMESHEET-SUBMIT-SCRIPT-DATA-AND-VALIDATION'::text))
126.          

SubPlan (for Index Scan)

127. 0.000 0.000 ↓ 0.0

Nested Loop (cost=43,240.90..43,624.82 rows=1 width=16) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Hash Join (cost=43,240.47..43,622.36 rows=1 width=24) (actual rows= loops=)

  • Hash Cond: ((faas.timesheetid = tah_2.timesheetid) AND (faas.nextaction_serialnumber = tah_2.serialnumber))
129.          

CTE firstactionaftersubmit

130. 0.000 0.000 ↓ 0.0

HashAggregate (cost=40,453.34..40,604.58 rows=15,124 width=24) (actual rows= loops=)

  • Group Key: submissions.timesheetid, submissions.serialnumber
131.          

CTE submissions

132. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory (cost=0.42..9,341.05 rows=151,245 width=20) (actual rows= loops=)

  • Index Cond: (action = 1)
133. 0.000 0.000 ↓ 0.0

Hash Join (cost=15,806.57..29,853.23 rows=167,876 width=24) (actual rows= loops=)

  • Hash Cond: (submissions.timesheetid = tah_3.timesheetid)
  • Join Filter: (tah_3.serialnumber > submissions.serialnumber)
134. 0.000 0.000 ↓ 0.0

CTE Scan on submissions (cost=0.00..3,024.90 rows=151,245 width=20) (actual rows= loops=)

135. 0.000 0.000 ↓ 0.0

Hash (cost=10,143.32..10,143.32 rows=453,060 width=20) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Index Only Scan using ixtah2timesheetid on timesheetapprovalhistory tah_3 (cost=0.42..10,143.32 rows=453,060 width=20) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

CTE Scan on firstactionaftersubmit faas (cost=0.00..302.48 rows=15,124 width=24) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

Hash (cost=2,635.56..2,635.56 rows=22 width=20) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory tah_2 (cost=0.42..2,635.56 rows=22 width=20) (actual rows= loops=)

  • Index Cond: (action = 3)
  • Filter: (upper(systemprocessidentifier) = 'URN:REPLICON:APPROVAL-SYSTEM-PROCESS:TIMESHEET-SUBMIT-SCRIPT-DATA-AND-VALIDATION'::text)
140. 0.000 0.000 ↓ 0.0

Index Scan using ixtah2timesheetid on timesheetapprovalhistory tah_1 (cost=0.42..2.44 rows=1 width=36) (actual rows= loops=)

  • Index Cond: ((timesheetid = faas.timesheetid) AND (serialnumber >= faas.submission_serialnumber) AND (serialnumber <= faas.nextaction_serialnumber))
141. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts_9 (cost=0.42..2.44 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = tah.timesheetid)
142. 0.000 0.000 ↓ 0.0

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot tsformat_1 (cost=0.43..3.06 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = ts_9.id)
  • Filter: (upper(key) = 'URN:REPLICON:POLICY:TIMESHEET:TIMESHEET-FORMAT'::text)
143. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue kv_ea (cost=0.43..34.15 rows=2 width=87) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = tah.id)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-EFFECTIVE-USER'::text)
144. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue kv_aa (cost=0.43..34.15 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = tah.id)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-ACTUAL-USER'::text)
145. 0.000 0.000 ↓ 0.0

Index Only Scan using ixdtslsftimesheetid on dm_timesheetlist_facts tslist (cost=0.42..1.63 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (timesheetid = "*SELECT* 1".timesheetid)
146. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts (cost=0.42..0.45 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = tslist.timesheetid)