explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ihxp

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

Sort (cost=3,557,082.33..3,557,260.52 rows=71,276 width=584) (actual rows= loops=)

  • Sort Key: ts.startdate, ts.enddate, "*SELECT* 1".modifiedonutc, "*SELECT* 1".action, "*SELECT* 1".validuntilutc, ((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, ts.id
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.26..3,551,337.09 rows=71,276 width=584) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.98..3,528,821.29 rows=71,276 width=351) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..3,495,758.76 rows=71,581 width=359) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Append (cost=1.12..3,447,395.22 rows=71,581 width=343) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=1.12..37.28 rows=1 width=357) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..37.27 rows=1 width=397) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..27.46 rows=1 width=112) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.12..12.45 rows=1 width=96) (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=80) (actual rows= loops=)

  • Filter: ((fromtimestamputc >= '2020-06-26 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-27 04:00:00'::timestamp without time zone))
11. 0.000 0.000 ↓ 0.0

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

12. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_1 (cost=0.43..14.88 rows=13 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.57..9.78 rows=3 width=97) (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.56..27.48 rows=1 width=308) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..27.47 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=56) (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=56) (actual rows= loops=)

  • Filter: ((totimestamputc IS NOT NULL) AND (totimestamputc >= '2020-06-26 04:00:00'::timestamp without time zone) AND (totimestamputc < '2020-06-27 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.43..14.88 rows=13 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=52,233.46..117,705.10 rows=59,175 width=342) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Gather (cost=52,233.46..117,113.35 rows=59,175 width=382) (actual rows= loops=)

  • Workers Planned: 2
22. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=51,233.46..110,195.85 rows=24,656 width=382) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=51,232.77..71,990.02 rows=8,236 width=153) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=51,232.08..59,205.27 rows=2,756 width=104) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Merge Join (cost=51,231.39..51,801.69 rows=2,756 width=104) (actual rows= loops=)

  • Merge Cond: (ts_3.userid = rev.userid)
  • Join Filter: ((rev.entrydate >= ts_3.startdate) AND (rev.entrydate <= ts_3.enddate))
26. 0.000 0.000 ↓ 0.0

Sort (cost=33,353.76..33,369.66 rows=6,361 width=28) (actual rows= loops=)

  • Sort Key: ts_3.userid
27. 0.000 0.000 ↓ 0.0

Hash Join (cost=16,144.47..32,951.90 rows=6,361 width=28) (actual rows= loops=)

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

Parallel Seq Scan on timesheet ts_3 (cost=0.00..15,578.00 rows=441,400 width=28) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=15,958.52..15,958.52 rows=14,876 width=16) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

HashAggregate (cost=15,809.76..15,958.52 rows=14,876 width=16) (actual rows= loops=)

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

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot (cost=0.69..15,771.59 rows=15,266 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))
32. 0.000 0.000 ↓ 0.0

Sort (cost=17,877.58..17,960.79 rows=33,284 width=88) (actual rows= loops=)

  • Sort Key: rev.userid
33. 0.000 0.000 ↓ 0.0

Index Scan using ixter2fromtimestamputc on timeentryrevision rev (cost=0.56..15,377.53 rows=33,284 width=88) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue changereason (cost=0.69..2.68 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 actualuser (cost=0.69..4.61 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser (cost=0.69..4.61 rows=3 width=65) (actual rows= loops=)

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

Subquery Scan on *SELECT* 4 (cost=1,004.07..68,405.66 rows=1 width=342) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1,004.07..68,405.65 rows=1 width=382) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,003.50..68,386.65 rows=1 width=186) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.81..68,382.06 rows=1 width=153) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.12..68,377.48 rows=1 width=104) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,001.69..68,376.29 rows=1 width=88) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Gather (cost=1,001.13..68,372.96 rows=1 width=80) (actual rows= loops=)

  • Workers Planned: 2
44. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=1.13..67,372.86 rows=1 width=80) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev (cost=0.57..21,810.90 rows=19,436 width=80) (actual rows= loops=)

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

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

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

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

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

Index Scan using ixtsuseridstartdateenddate on timesheet ts_4 (cost=0.43..1.06 rows=13 width=28) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_1 (cost=0.69..4.56 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_1 (cost=0.69..4.56 rows=3 width=65) (actual rows= loops=)

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_1 (cost=0.57..9.78 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))
52. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=17,153.06..1,445,991.79 rows=8,291 width=342) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Gather (cost=17,153.06..1,445,908.88 rows=8,291 width=382) (actual rows= loops=)

  • Workers Planned: 2
54. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=16,153.06..1,444,079.78 rows=3,455 width=382) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=16,151.93..1,429,688.73 rows=3,455 width=178) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=16,151.24..1,424,216.28 rows=1,154 width=145) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=16,150.55..1,422,385.81 rows=386 width=96) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash Join (cost=16,146.03..1,420,035.05 rows=423 width=156) (actual rows= loops=)

  • Hash Cond: (ts_5.id = timesheetpolicysettingssnapshot_2.timesheetid)
59. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.56..1,403,808.72 rows=29,389 width=156) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..1,401,276.92 rows=2,131 width=140) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixtemr2fromtimestamputc on timeentrymetadatarevision mdrev_1 (cost=0.57..1,388,347.02 rows=3,633 width=116) (actual rows= loops=)

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

Index Scan using ixtertimeentryid on timeentryrevision rev_2 (cost=0.56..3.55 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)))
63. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_5 (cost=0.43..1.06 rows=13 width=28) (actual rows= loops=)

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

Hash (cost=15,958.52..15,958.52 rows=14,876 width=16) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

HashAggregate (cost=15,809.76..15,958.52 rows=14,876 width=16) (actual rows= loops=)

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

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_2 (cost=0.69..15,771.59 rows=15,266 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))
67. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timeentrymetadatarevision (cost=4.53..5.55 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=4.53..4.53 rows=1 width=0) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtemrtimeentryid (cost=0.00..1.75 rows=26 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..2.52 rows=129 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 actualuser_2 (cost=0.69..4.71 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_2 (cost=0.69..4.71 rows=3 width=65) (actual rows= loops=)

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

Nested Loop Left Join (cost=1.12..4.16 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.56..3.54 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.56..0.60 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=1,182.00..26,081.26 rows=1 width=342) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1,182.00..26,081.25 rows=1 width=382) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,181.43..26,062.25 rows=1 width=186) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,180.74..26,057.52 rows=1 width=153) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,180.05..26,052.79 rows=1 width=104) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,179.62..26,051.61 rows=1 width=88) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Gather (cost=1,179.06..26,048.07 rows=1 width=80) (actual rows= loops=)

  • Workers Planned: 2
83. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=179.06..25,047.97 rows=1 width=80) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on objectextensionfieldvaluerevision oefvr (cost=178.50..12,260.68 rows=5,079 width=80) (actual rows= loops=)

  • Recheck Cond: ((fromtimestamputc >= '2020-06-26 04:00:00'::timestamp without time zone) AND (fromtimestamputc < '2020-06-27 04:00:00'::timestamp without time zone))
85. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixoefvr2fromtimestamputc (cost=0.00..175.45 rows=12,189 width=0) (actual rows= loops=)

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

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

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

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

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

Index Scan using ixtsuseridstartdateenddate on timesheet ts_6 (cost=0.43..1.06 rows=13 width=28) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_3 (cost=0.69..4.70 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_3 (cost=0.69..4.70 rows=3 width=65) (actual rows= loops=)

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_3 (cost=0.57..9.78 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))
92. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 7 (cost=17,152.16..375,679.31 rows=3,018 width=342) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Gather (cost=17,152.16..375,649.13 rows=3,018 width=382) (actual rows= loops=)

  • Workers Planned: 1
94. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=16,152.16..374,347.33 rows=1,775 width=382) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=16,151.03..366,886.27 rows=1,775 width=178) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=16,150.34..364,059.52 rows=593 width=145) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=16,149.65..363,115.68 rows=198 width=96) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Hash Join (cost=16,146.02..362,141.40 rows=209 width=128) (actual rows= loops=)

  • Hash Cond: (ts_7.id = timesheetpolicysettingssnapshot_4.timesheetid)
99. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..345,956.55 rows=14,498 width=128) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..344,707.88 rows=1,051 width=112) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Parallel Index Scan using ixoefvr2fromtimestamputc on objectextensionfieldvaluerevision oefvr_1 (cost=0.56..338,261.80 rows=1,792 width=88) (actual rows= loops=)

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

Index Scan using ixtertimeentryid on timeentryrevision rev_4 (cost=0.56..3.59 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)))
103. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_7 (cost=0.43..1.06 rows=13 width=28) (actual rows= loops=)

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

Hash (cost=15,958.52..15,958.52 rows=14,876 width=16) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

HashAggregate (cost=15,809.76..15,958.52 rows=14,876 width=16) (actual rows= loops=)

  • Group Key: timesheetpolicysettingssnapshot_4.timesheetid
106. 0.000 0.000 ↓ 0.0

Index Scan using ixtspss2key on timesheetpolicysettingssnapshot timesheetpolicysettingssnapshot_4 (cost=0.69..15,771.59 rows=15,266 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))
107. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on objectextensionfieldvaluerevision (cost=3.63..4.65 rows=1 width=56) (actual rows= loops=)

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

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

109. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixoefvrobjectid (cost=0.00..1.59 rows=5 width=0) (actual rows= loops=)

  • Index Cond: (objectid = oefvr_1.objectid)
110. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixoefvr2fromtimestamputc (cost=0.00..1.79 rows=33 width=0) (actual rows= loops=)

  • Index Cond: (fromtimestamputc = oefvr_1.totimestamputc)
111. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_4 (cost=0.69..4.74 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_4 (cost=0.69..4.74 rows=3 width=65) (actual rows= loops=)

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

Nested Loop Left Join (cost=1.12..4.19 rows=1 width=24) (actual rows= loops=)

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

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

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

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

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

Subquery Scan on *SELECT* 8 (cost=1,003.62..547,613.01 rows=1 width=342) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,003.62..547,613.00 rows=1 width=382) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.93..547,610.28 rows=1 width=178) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,002.24..547,605.53 rows=1 width=129) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,001.55..547,600.77 rows=1 width=80) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Gather (cost=1,001.12..547,597.00 rows=1 width=64) (actual rows= loops=)

  • Workers Planned: 2
122. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.12..546,596.90 rows=1 width=64) (actual rows= loops=)

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

Parallel Index Scan using ixter2fromtimestamputc on timeentryrevision rev_5 (cost=0.56..540,365.09 rows=2,432 width=64) (actual rows= loops=)

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

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

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

Index Scan using ixtsuseridstartdateenddate on timesheet ts_8 (cost=0.43..3.64 rows=13 width=28) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser_5 (cost=0.69..4.72 rows=3 width=65) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser_5 (cost=0.69..4.72 rows=3 width=65) (actual rows= loops=)

  • Index Cond: ((revisionauditid = rev_5.closingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
128. 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))
129. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 9 (cost=434,089.47..865,854.32 rows=1,092 width=439) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Nested Loop (cost=434,089.47..865,843.40 rows=1,092 width=479) (actual rows= loops=)

131. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=434,088.90..856,629.24 rows=1,079 width=226) (actual rows= loops=)

132. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=434,088.33..723,031.83 rows=1,079 width=172) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Nested Loop (cost=434,087.77..589,391.27 rows=1,079 width=102) (actual rows= loops=)

134. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalhistory tah (cost=434,087.34..586,882.11 rows=1,079 width=82) (actual rows= loops=)

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

SubPlan (for Seq Scan)

136. 0.000 0.000 ↓ 0.0

Nested Loop (cost=433,075.30..434,087.34 rows=1 width=16) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

Hash Join (cost=433,074.87..434,084.87 rows=1 width=24) (actual rows= loops=)

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

CTE firstactionaftersubmit

139. 0.000 0.000 ↓ 0.0

HashAggregate (cost=405,872.99..406,272.99 rows=40,000 width=24) (actual rows= loops=)

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

CTE submissions

141. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory (cost=0.43..80,947.70 rows=1,137,103 width=20) (actual rows= loops=)

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

Merge Join (cost=137,117.61..312,839.16 rows=1,611,483 width=24) (actual rows= loops=)

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

Sort (cost=137,117.18..139,959.93 rows=1,137,103 width=20) (actual rows= loops=)

  • Sort Key: submissions.timesheetid
144. 0.000 0.000 ↓ 0.0

CTE Scan on submissions (cost=0.00..22,742.06 rows=1,137,103 width=20) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Materialize (cost=0.43..94,516.14 rows=3,633,012 width=20) (actual rows= loops=)

146. 0.000 0.000 ↓ 0.0

Index Only Scan using ixtah2timesheetid on timesheetapprovalhistory tah_3 (cost=0.43..85,433.61 rows=3,633,012 width=20) (actual rows= loops=)

147. 0.000 0.000 ↓ 0.0

CTE Scan on firstactionaftersubmit faas (cost=0.00..800.00 rows=40,000 width=24) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Hash (cost=26,798.42..26,798.42 rows=231 width=20) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory tah_2 (cost=0.43..26,798.42 rows=231 width=20) (actual rows= loops=)

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

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

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

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

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

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue kv_ea (cost=0.56..123.79 rows=7 width=86) (actual rows= loops=)

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

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue kv_aa (cost=0.56..123.79 rows=3 width=86) (actual rows= loops=)

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

Index Scan using ixtpsstimesheetid on timesheetpolicysettingssnapshot tsformat_1 (cost=0.57..8.50 rows=4 width=97) (actual rows= loops=)

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

Index Only Scan using dm_timesheetlist_facts_pkey on dm_timesheetlist_facts tslist (cost=0.43..0.68 rows=1 width=16) (actual rows= loops=)

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

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

  • Index Cond: (id = tslist.timesheetid)
157. 0.000 0.000 ↓ 0.0

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

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