explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KDX1

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

Sort (cost=1,043,292.02..1,043,321.53 rows=11,805 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=2.09..1,042,493.58 rows=11,805 width=356) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.81..1,038,895.01 rows=11,805 width=118) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.39..1,033,413.03 rows=11,980 width=134) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Append (cost=0.97..1,026,046.73 rows=11,980 width=110) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

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

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..23.31 rows=1 width=348) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

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

9. 0.000 0.000 ↓ 0.0

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

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

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

  • Filter: ((fromtimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
11. 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=)

12. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot tsformat (cost=0.43..3.24 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))
14. 0.000 0.000 ↓ 0.0

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

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..20.07 rows=1 width=348) (actual rows= loops=)

16. 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)
17. 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-06-29 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
18. 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)
19. 0.000 0.000 ↓ 0.0

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

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

Subquery Scan on *SELECT* 3 (cost=3,716.15..54,102.54 rows=8,597 width=110) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Gather (cost=3,716.15..54,016.57 rows=8,597 width=378) (actual rows= loops=)

  • Workers Planned: 1
22. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,716.15..52,156.87 rows=5,057 width=378) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,715.46..40,919.13 rows=4,368 width=134) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,714.78..31,153.01 rows=3,796 width=72) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,714.09..21,386.88 rows=3,796 width=72) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,713.66..5,097.64 rows=1,512 width=28) (actual rows= loops=)

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

Parallel Seq Scan on timesheet ts_3 (cost=0.00..2,168.35 rows=75,735 width=28) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=2,681.85..2,681.85 rows=2,545 width=16) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,656.40..2,681.85 rows=2,545 width=16) (actual rows= loops=)

  • Group Key: timesheetpolicysettingssnapshot.timesheetid
30. 0.000 0.000 ↓ 0.0

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot (cost=0.68..2,649.97 rows=2,570 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))
31. 0.000 0.000 ↓ 0.0

Index Scan using ixter2userid on timeentryrevision rev (cost=0.43..10.75 rows=2 width=56) (actual rows= loops=)

  • Index Cond: ((userid = ts_3.userid) AND (entrydate >= ts_3.startdate) AND (entrydate <= ts_3.enddate))
  • Filter: ((fromtimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
32. 0.000 0.000 ↓ 0.0

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

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

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

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

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

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

Subquery Scan on *SELECT* 4 (cost=49,830.61..133,766.94 rows=1 width=110) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=49,830.61..133,766.93 rows=1 width=378) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=49,829.92..133,764.64 rows=1 width=118) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Gather (cost=49,829.24..133,762.35 rows=1 width=56) (actual rows= loops=)

  • Workers Planned: 2
39. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=48,829.24..132,762.25 rows=1 width=56) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash Join (cost=48,828.81..125,793.13 rows=5,912 width=72) (actual rows= loops=)

  • Hash Cond: (mdrev.timeentryid = rev_1.timeentryid)
  • Join Filter: ((rev_1.fromtimestamputc <= mdrev.fromtimestamputc) AND ((rev_1.totimestamputc IS NULL) OR (rev_1.totimestamputc > mdrev.fromtimestamputc)))
41. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev (cost=0.56..72,605.71 rows=70,526 width=48) (actual rows= loops=)

  • Index Cond: ((fromtimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
42. 0.000 0.000 ↓ 0.0

Hash (cost=37,707.48..37,707.48 rows=889,661 width=56) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,657.25..37,707.48 rows=889,661 width=56) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,656.82..5,830.98 rows=2,570 width=28) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,656.40..2,681.85 rows=2,545 width=16) (actual rows= loops=)

  • Group Key: timesheetpolicysettingssnapshot_1.timesheetid
46. 0.000 0.000 ↓ 0.0

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_1 (cost=0.68..2,649.97 rows=2,570 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))
47. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts_4 (cost=0.42..1.25 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = timesheetpolicysettingssnapshot_1.timesheetid)
48. 0.000 0.000 ↓ 0.0

Index Scan using ixter2userid on timeentryrevision rev_1 (cost=0.43..9.10 rows=330 width=40) (actual rows= loops=)

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

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

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_1 (cost=0.69..2.28 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.28 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

Subquery Scan on *SELECT* 5 (cost=49,834.76..612,712.26 rows=3,376 width=110) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Gather (cost=49,834.76..612,678.50 rows=3,376 width=378) (actual rows= loops=)

  • Workers Planned: 2
54. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=48,834.76..611,340.90 rows=1,407 width=378) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=48,833.89..605,948.14 rows=1,407 width=110) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=48,833.21..602,876.88 rows=1,175 width=126) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=48,832.52..600,294.42 rows=988 width=64) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash Join (cost=48,828.81..594,816.44 rows=1,155 width=124) (actual rows= loops=)

  • Hash Cond: (mdrev_1.timeentryid = rev_2.timeentryid)
  • Join Filter: ((rev_2.fromtimestamputc <= mdrev_1.totimestamputc) AND ((rev_2.totimestamputc IS NULL) OR (rev_2.totimestamputc > mdrev_1.totimestamputc)))
59. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev_1 (cost=0.56..545,136.96 rows=13,772 width=100) (actual rows= loops=)

  • Index Cond: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
60. 0.000 0.000 ↓ 0.0

Hash (cost=37,707.48..37,707.48 rows=889,661 width=56) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,657.25..37,707.48 rows=889,661 width=56) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,656.82..5,830.98 rows=2,570 width=28) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,656.40..2,681.85 rows=2,545 width=16) (actual rows= loops=)

  • Group Key: timesheetpolicysettingssnapshot_2.timesheetid
64. 0.000 0.000 ↓ 0.0

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_2 (cost=0.68..2,649.97 rows=2,570 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))
65. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts_5 (cost=0.42..1.25 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = timesheetpolicysettingssnapshot_2.timesheetid)
66. 0.000 0.000 ↓ 0.0

Index Scan using ixter2userid on timeentryrevision rev_2 (cost=0.43..9.10 rows=330 width=40) (actual rows= loops=)

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

Bitmap Heap Scan on timeentrymetadatarevision (cost=3.71..4.73 rows=1 width=84) (actual rows= loops=)

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

BitmapAnd (cost=3.71..3.71 rows=1 width=0) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtemrtimeentryid (cost=0.00..1.64 rows=24 width=0) (actual rows= loops=)

  • Index Cond: (timeentryid = mdrev_1.timeentryid)
70. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtemr2fromtimestamputc (cost=0.00..1.82 rows=46 width=0) (actual rows= loops=)

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

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

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

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

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

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

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

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

  • Index Cond: (timeentryid = mdrev_1.timeentryid)
  • Filter: (totimestamputc = mdrev_1.totimestamputc)
75. 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)
76. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 6 (cost=3.50..2,078.95 rows=1 width=110) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=3.50..2,078.94 rows=1 width=378) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.07..2,072.90 rows=1 width=102) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.38..2,070.19 rows=1 width=118) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.70..2,067.47 rows=1 width=56) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.28..2,066.70 rows=1 width=40) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

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

83. 0.000 0.000 ↓ 0.0

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

  • Index Cond: ((fromtimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
84. 0.000 0.000 ↓ 0.0

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

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

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

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

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

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

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

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

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

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_3 (cost=0.43..3.24 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))
90. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 7 (cost=4.36..2,776.70 rows=1 width=110) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=4.36..2,776.69 rows=1 width=378) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=3.49..2,771.70 rows=1 width=110) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.07..2,769.25 rows=1 width=142) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

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

95. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.70..2,763.82 rows=1 width=96) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..2,608.53 rows=48 width=96) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..2,603.10 rows=7 width=80) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Index Scan using ixoefvr2fromtimestamputc on objectextensionfieldvaluerevision oefvr_1 (cost=0.42..2,548.98 rows=12 width=72) (actual rows= loops=)

  • Index Cond: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
99. 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)))
100. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_4 (cost=0.43..3.24 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))
102. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: ((revisionauditid = oefvr_1.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
104. 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))
105. 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)
106. 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)
107. 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)
108. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 8 (cost=1,003.46..164,682.63 rows=1 width=110) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,003.46..164,682.62 rows=1 width=378) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.78..164,679.94 rows=1 width=110) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.09..164,677.25 rows=1 width=110) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,001.41..164,674.57 rows=1 width=48) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Gather (cost=1,000.99..164,673.60 rows=1 width=32) (actual rows= loops=)

  • Workers Planned: 2
114. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.99..163,673.50 rows=1 width=32) (actual rows= loops=)

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

Parallel Index Scan using ixter2fromtimestamputc on timeentryrevision rev_5 (cost=0.56..153,685.58 rows=4,334 width=48) (actual rows= loops=)

  • Index Cond: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-06-30 04:00:00'::timestamp without time zone))
116. 0.000 0.000 ↓ 0.0

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

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

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

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

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

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

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

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

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

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

Subquery Scan on *SELECT* 9 (cost=39,776.31..55,883.31 rows=1 width=119) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=39,776.31..55,883.30 rows=1 width=387) (actual rows= loops=)

123. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=39,775.88..55,851.19 rows=1 width=119) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,775.45..55,819.07 rows=1 width=48) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,775.01..55,816.07 rows=1 width=64) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalhistory tah (cost=39,774.60..55,813.63 rows=1 width=44) (actual rows= loops=)

  • Filter: ((NOT (hashed SubPlan 3)) AND (timestamputc >= '2020-06-29 04:00:00'::timestamp without time zone) AND (timestamputc < '2020-06-30 04:00:00'::timestamp without time zone) AND (COALESCE(upper(systemprocessidentifier), ''::text) <> 'URN:REPLICON:APPROVAL-SYSTEM-PROCESS:TIMESHEET-SUBMIT-SCRIPT-DATA-AND-VALIDATION'::text))
127.          

SubPlan (for Seq Scan)

128. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,427.89..39,774.59 rows=1 width=16) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

Hash Join (cost=39,427.47..39,772.13 rows=1 width=24) (actual rows= loops=)

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

CTE firstactionaftersubmit

131. 0.000 0.000 ↓ 0.0

HashAggregate (cost=36,868.39..37,004.89 rows=13,650 width=24) (actual rows= loops=)

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

CTE submissions

133. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory (cost=0.42..8,454.44 rows=136,497 width=20) (actual rows= loops=)

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

Hash Join (cost=14,794.14..27,281.46 rows=150,999 width=24) (actual rows= loops=)

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

CTE Scan on submissions (cost=0.00..2,729.94 rows=136,497 width=20) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Hash (cost=9,682.45..9,682.45 rows=408,935 width=20) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

Index Only Scan using ixtah2timesheetid on timesheetapprovalhistory tah_3 (cost=0.42..9,682.45 rows=408,935 width=20) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

CTE Scan on firstactionaftersubmit faas (cost=0.00..273.00 rows=13,650 width=24) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

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

140. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (action = 3)
  • Filter: (upper(systemprocessidentifier) = 'URN:REPLICON:APPROVAL-SYSTEM-PROCESS:TIMESHEET-SUBMIT-SCRIPT-DATA-AND-VALIDATION'::text)
141. 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))
142. 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)
143. 0.000 0.000 ↓ 0.0

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

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

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

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

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue kv_aa (cost=0.43..32.11 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)
146. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: (timesheetid = ts.id)
148. 0.000 0.000 ↓ 0.0

Index Scan using userinfo_pkey on userinfo ui (cost=0.28..0.30 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (id = "*SELECT* 1".userid)