explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BGJb

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

Sort (cost=2,353,165,354.82..2,353,165,356.75 rows=772 width=1,971) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".entrydate, ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", ui.duplicatename, ((login.loginname)::character varying(255)) COLLATE "en_US", ((ui.displayname)::text) COLLATE "en_US", ((pj.name)::character varying(255)) COLLATE "en_US", ((tk.name)::character varying(255)) COLLATE "en_US", ((billingrate19.name)::character varying(50)) COLLATE "en_US
2.          

CTE timesheet0cte

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.40..20.42 rows=1 width=76) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..18.27 rows=1 width=178) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.47 rows=1 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..4.59 rows=1 width=20) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest3 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 234)
8. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalnodes_pkey on timesheetapprovalnodes timesheetapprovalnodes2 (cost=0.28..2.29 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequest3.nodeid)
9. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet0 (cost=0.29..0.88 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes2.timesheetid)
10. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue1 (cost=0.28..12.79 rows=1 width=170) (actual rows= loops=)

  • Index Cond: (tsapprovalrequestid = tsapprovalrequest3.id)
  • Filter: ((upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text) OR ((upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text) AND (upper(uri) = 'URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text)))
11. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue4 (cost=0.28..2.14 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue1.parentid)
  • Filter: (parentid IS NULL)
12.          

CTE timesheet5cte

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=167.16..369.69 rows=1 width=76) (actual rows= loops=)

  • Join Filter: ((upper(esheetapprovalhistorykeyvalue6.uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text) OR ((upper(esheetapprovalhistorykeyvalue6.uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text) AND (upper(esheetapprovalhistorykeyvalue7.uri) = 'URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text)))
14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=166.73..369.06 rows=1 width=100) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=166.31..367.35 rows=1 width=100) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=165.88..366.77 rows=1 width=28) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=165.45..365.16 rows=1 width=28) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=165.02..362.35 rows=1 width=28) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=164.60..359.90 rows=1 width=28) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash Join (cost=164.31..358.27 rows=1 width=32) (actual rows= loops=)

  • Hash Cond: (esheetapprovalhistorykeyvalue9.timesheetapprovalhistoryid = timesheetapprovalhistory8.id)
21. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvuri on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.55..194.21 rows=115 width=32) (actual rows= loops=)

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
22. 0.000 0.000 ↓ 0.0

Hash (cost=161.64..161.64 rows=169 width=32) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using ixtahuserid on timesheetapprovalhistory timesheetapprovalhistory8 (cost=0.29..161.64 rows=169 width=32) (actual rows= loops=)

  • Index Cond: (userid = 234)
24. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet5 (cost=0.29..1.63 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalhistory8.timesheetid)
25. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue10 (cost=0.43..2.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = esheetapprovalhistorykeyvalue9.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
26. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue11 (cost=0.43..2.80 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue10.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
27. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue12 (cost=0.43..1.57 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue11.id)
28. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue6 (cost=0.43..0.57 rows=1 width=104) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue12.id)
  • Filter: ((upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text) OR (upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text))
29. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue13 (cost=0.43..1.67 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = esheetapprovalhistorykeyvalue6.id)
30. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue7 (cost=0.43..0.53 rows=4 width=88) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue13.id)
31.          

Initplan (for Sort)

32. 0.000 0.000 ↓ 0.0

Seq Scan on systeminformation (cost=0.00..1.01 rows=1 width=4) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,176,577,179.75..2,353,164,926.68 rows=772 width=1,971) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".billingrateid = billingrate19.id)
34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,176,577,178.70..2,353,164,923.56 rows=772 width=145) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..3.59 rows=1 width=31) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Scan using login_pkey on login (cost=0.28..2.29 rows=1 width=27) (actual rows= loops=)

  • Index Cond: (userid = 194)
37. 0.000 0.000 ↓ 0.0

Index Only Scan using userinfo_pkey on userinfo userinfo25 (cost=0.28..1.29 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = 194)
38. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,176,577,178.15..2,353,164,912.25 rows=772 width=122) (actual rows= loops=)

  • Hash Cond: (task23.id = tk.id)
39. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,176,577,174.94..2,353,164,898.43 rows=772 width=116) (actual rows= loops=)

  • Hash Cond: (COALESCE(project21.id, task23.projectid) = pj.id)
40. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,176,576,397.99..2,353,164,119.45 rows=772 width=85) (actual rows= loops=)

  • Hash Cond: (CASE WHEN ("substring"(timeentrymetadata22.uri, '^urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:task:(.*)$'::text) ~ '^\s*[-]?[0-9]+\s*$'::text) THEN ("substring"(timeentrymetadata22.uri, '^urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:task:(.*)$'::text))::integer ELSE NULL::integer END = task23.id)
41. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,176,576,396.97..2,353,164,115.85 rows=772 width=135) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,176,576,396.67..2,353,163,872.61 rows=772 width=189) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,176,576,396.11..2,353,162,094.28 rows=687 width=147) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = 194)
45. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,176,576,395.84..2,353,162,085.11 rows=687 width=114) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,176,576,395.28..2,353,160,306.78 rows=687 width=56) (actual rows= loops=)

  • Filter: (((timeentrymetadata24.uri IS NULL) AND ("*SELECT* 1".timeoffentryid IS NULL) AND (("*SELECT* 1".timeallocationtype = 1) OR ("*SELECT* 1".timeallocationtype IS NULL))) OR (timeentrymetadata24.uri IS NOT NULL) OR ("*SELECT* 1".timeoffentryid IS NOT NULL) OR ((timeentrymetadata24.uri IS NULL) AND ("*SELECT* 1".timeoffentryid IS NULL) AND ("*SELECT* 1".timeallocationtype = 0)))
47. 0.000 0.000 ↓ 0.0

Append (cost=1,176,576,394.72..2,353,158,522.42 rows=688 width=64) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=1,176,576,394.72..1,176,582,115.71 rows=686 width=64) (actual rows= loops=)

  • Filter: ((hashed SubPlan 23) OR (hashed SubPlan 30))
49. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.55..5,708.82 rows=915 width=140) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.99..3,311.23 rows=915 width=183) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..943.38 rows=915 width=125) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.03 rows=1 width=65) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on systeminformation si (cost=0.00..1.01 rows=1 width=33) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on projectsysteminformation psi (cost=0.00..1.01 rows=1 width=32) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Index Scan using ixte2userid on timeentry te (cost=0.43..932.20 rows=915 width=60) (actual rows= loops=)

  • Index Cond: ((userid = 194) AND (entrydate >= '2020-06-01'::date) AND (entrydate <= '2020-09-11'::date))
  • Filter: ((timeallocationtype <> 2) OR (timeallocationtype IS NULL))
56. 0.000 0.000 ↓ 0.0

Index Scan using ixtem2timeentryid on timeentrymetadata tembillingrate (cost=0.56..2.58 rows=1 width=74) (actual rows= loops=)

  • Index Cond: ((timeentryid = te.id) AND (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:BILLING-RATE'::text))
57. 0.000 0.000 ↓ 0.0

Index Scan using ixtem2timeentryid on timeentrymetadata temdbreaktype (cost=0.56..2.58 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((timeentryid = te.id) AND (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:BREAK-TYPE'::text))
58.          

SubPlan (for Subquery Scan)

59. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..1,176,556,075.90 rows=3,304,875 width=16) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Seq Scan on timeentryrevision timeentryrevision26 (cost=0.00..397,581.16 rows=3,325,163 width=32) (actual rows= loops=)

  • Filter: (totimestamputc IS NULL)
61. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_pkey on timeentryrevision timeentryrevision27 (cost=0.56..353.71 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timeentryrevision26.id)
  • Filter: ((userid = 234) OR (alternatives: SubPlan 4 or hashed SubPlan 5) OR (SubPlan 6) OR (SubPlan 7) OR (SubPlan 8) OR (SubPlan 9) OR (SubPlan 12) OR ((SubPlan 15) AND ((SubPlan 16) OR (SubPlan 17))) OR ((SubPlan 20) AND ((SubPlan 21) OR (SubPlan 22))))
62.          

SubPlan (for Index Scan)

63. 0.000 0.000 ↓ 0.0

Index Scan using ix3uh_usersuperstart on userhierarchy userhierarchy28 (cost=0.28..2.30 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((userid = timeentryrevision27.userid) AND (supervisorid = 234) AND (startdate <= '2020-09-11'::date))
  • Filter: (enddate >= '2020-09-11'::date)
64. 0.000 0.000 ↓ 0.0

Index Scan using ixuhsupervisorid on userhierarchy userhierarchy28_1 (cost=0.28..4.98 rows=4 width=4) (actual rows= loops=)

  • Index Cond: (supervisorid = 234)
  • Filter: ((startdate <= '2020-09-11'::date) AND (enddate >= '2020-09-11'::date))
65. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.40..22.83 rows=1 width=32) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..18.56 rows=12 width=84) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.77 rows=1 width=4) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..4.59 rows=1 width=20) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest32 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 234)
70. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalnodes_pkey on timesheetapprovalnodes timesheetapprovalnodes31 (cost=0.28..2.29 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequest32.nodeid)
71. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet30 (cost=0.29..0.89 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes31.timesheetid)
  • Filter: ((startdate <= timeentryrevision27.entrydate) AND (enddate >= timeentryrevision27.entrydate) AND (userid = timeentryrevision27.userid))
72. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue29 (cost=0.28..12.67 rows=12 width=88) (actual rows= loops=)

  • Index Cond: (tsapprovalrequestid = tsapprovalrequest32.id)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
73. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue33 (cost=0.28..0.36 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue29.parentid)
  • Filter: (parentid IS NULL)
74. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.14..35.48 rows=1 width=32) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.71..34.91 rows=1 width=16) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.28..33.20 rows=1 width=16) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.85..32.64 rows=1 width=16) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.43..31.03 rows=1 width=16) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.00..28.22 rows=1 width=16) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.57..25.77 rows=1 width=16) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..17.87 rows=1 width=16) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet35 (cost=0.29..4.41 rows=3 width=16) (actual rows= loops=)

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

Index Scan using ixtah2timesheetid on timesheetapprovalhistory timesheetapprovalhistory36 (cost=0.42..4.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (timesheetid = timesheet35.id)
  • Filter: (userid = 234)
84. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue37 (cost=6.87..7.89 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory36.id) AND (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
85. 0.000 0.000 ↓ 0.0

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

86. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvtimesheetapprovalhistoryid (cost=0.00..1.63 rows=28 width=0) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory36.id)
87. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvuri (cost=0.00..4.96 rows=187 width=0) (actual rows= loops=)

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text)
88. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue38 (cost=0.43..2.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = sheetapprovalhistorykeyvalue37.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
89. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue39 (cost=0.43..2.80 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue38.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
90. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue40 (cost=0.43..1.57 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue39.id)
91. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue41 (cost=0.43..0.55 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue40.id)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
92. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue42 (cost=0.43..1.67 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue41.id)
93. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue34 (cost=0.43..0.53 rows=4 width=88) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue42.id)
94. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.52..9.52 rows=1 width=32) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.24..7.21 rows=1 width=84) (actual rows= loops=)

  • Join Filter: (tsapprovalrequest46.id = tsapprovalrequestkeyvalue43.tsapprovalrequestid)
96. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.77 rows=1 width=4) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..4.59 rows=1 width=20) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest46 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 234)
99. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalnodes_pkey on timesheetapprovalnodes timesheetapprovalnodes45 (cost=0.28..2.29 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequest46.nodeid)
100. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet44 (cost=0.29..0.89 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes45.timesheetid)
  • Filter: ((startdate <= timeentryrevision27.entrydate) AND (enddate >= timeentryrevision27.entrydate) AND (userid = timeentryrevision27.userid))
101. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue43 (cost=0.41..1.42 rows=1 width=88) (actual rows= loops=)

  • Index Cond: (upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text)
102. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue47 (cost=0.28..2.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue43.parentid)
  • Filter: (parentid IS NULL)
103. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.14..39.26 rows=1 width=32) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.71..38.69 rows=1 width=16) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.28..33.20 rows=1 width=16) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.85..32.64 rows=1 width=16) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.43..31.03 rows=1 width=16) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.00..28.22 rows=1 width=16) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.57..25.77 rows=1 width=16) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..17.87 rows=1 width=16) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet49 (cost=0.29..4.41 rows=3 width=16) (actual rows= loops=)

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

Index Scan using ixtah2timesheetid on timesheetapprovalhistory timesheetapprovalhistory50 (cost=0.42..4.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (timesheetid = timesheet49.id)
  • Filter: (userid = 234)
113. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue51 (cost=6.87..7.89 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory50.id) AND (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
114. 0.000 0.000 ↓ 0.0

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

115. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvtimesheetapprovalhistoryid (cost=0.00..1.63 rows=28 width=0) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory50.id)
116. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvuri (cost=0.00..4.96 rows=187 width=0) (actual rows= loops=)

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text)
117. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue52 (cost=0.43..2.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = sheetapprovalhistorykeyvalue51.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
118. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue53 (cost=0.43..2.80 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue52.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
119. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue54 (cost=0.43..1.57 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue53.id)
120. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue55 (cost=0.43..0.55 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue54.id)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text)
121. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue56 (cost=0.43..5.45 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue55.id)
122. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue48 (cost=0.43..0.53 rows=4 width=88) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue56.id)
123. 0.000 0.000 ↓ 0.0

Index Scan using ixtemrtimeentryid on timeentrymetadatarevision timeentrymetadatarevision57 (cost=15.99..63.90 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (timeentryid = timeentryrevision27.timeentryid)
  • Filter: ((fromtimestamputc <= timeentryrevision27.fromtimestamputc) AND ((totimestamputc > timeentryrevision27.fromtimestamputc) OR (totimestamputc IS NULL)) AND (((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:PROJECT'::text) AND (hashed SubPlan 10)) OR ((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:TASK'::text) AND (hashed SubPlan 11))))
124.          

SubPlan (for Index Scan)

125. 0.000 0.000 ↓ 0.0

Index Scan using ixprjprojectleaderapproverid on project project58 (cost=0.29..11.73 rows=11 width=32) (actual rows= loops=)

  • Index Cond: (projectleaderapproverid = 234)
126. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..3.66 rows=1 width=32) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Seq Scan on task task59 (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project project60 (cost=0.29..2.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = task59.projectid)
  • Filter: (projectleaderapproverid = 234)
129. 0.000 0.000 ↓ 0.0

Index Scan using ixtemrtimeentryid on timeentrymetadatarevision timeentrymetadatarevision61 (cost=15.99..63.90 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (timeentryid = timeentryrevision27.timeentryid)
  • Filter: ((fromtimestamputc <= timeentryrevision27.fromtimestamputc) AND ((totimestamputc > timeentryrevision27.fromtimestamputc) OR (totimestamputc IS NULL)) AND (((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:PROJECT'::text) AND (hashed SubPlan 13)) OR ((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:TASK'::text) AND (hashed SubPlan 14))))
130.          

SubPlan (for Index Scan)

131. 0.000 0.000 ↓ 0.0

Index Scan using ixprjprojectleaderapproverid on project project62 (cost=0.29..11.73 rows=11 width=32) (actual rows= loops=)

  • Index Cond: (projectleaderapproverid = 234)
132. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..3.66 rows=1 width=32) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Seq Scan on task task63 (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

134. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project project64 (cost=0.29..2.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = task63.projectid)
  • Filter: (projectleaderapproverid = 234)
135. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.40..22.83 rows=1 width=32) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..18.56 rows=12 width=84) (actual rows= loops=)

137. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.77 rows=1 width=4) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..4.59 rows=1 width=20) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest68 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 234)
140. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalnodes_pkey on timesheetapprovalnodes timesheetapprovalnodes67 (cost=0.28..2.29 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequest68.nodeid)
141. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet66 (cost=0.29..0.89 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes67.timesheetid)
  • Filter: ((startdate <= timeentryrevision27.entrydate) AND (enddate >= timeentryrevision27.entrydate) AND (userid = timeentryrevision27.userid))
142. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue65 (cost=0.28..12.67 rows=12 width=88) (actual rows= loops=)

  • Index Cond: (tsapprovalrequestid = tsapprovalrequest68.id)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
143. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue69 (cost=0.28..0.36 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue65.parentid)
  • Filter: (parentid IS NULL)
144. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.14..35.48 rows=1 width=32) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.71..34.91 rows=1 width=16) (actual rows= loops=)

146. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.28..33.20 rows=1 width=16) (actual rows= loops=)

147. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.85..32.64 rows=1 width=16) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.43..31.03 rows=1 width=16) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.00..28.22 rows=1 width=16) (actual rows= loops=)

150. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.57..25.77 rows=1 width=16) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..17.87 rows=1 width=16) (actual rows= loops=)

152. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet71 (cost=0.29..4.41 rows=3 width=16) (actual rows= loops=)

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

Index Scan using ixtah2timesheetid on timesheetapprovalhistory timesheetapprovalhistory72 (cost=0.42..4.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (timesheetid = timesheet71.id)
  • Filter: (userid = 234)
154. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue73 (cost=6.87..7.89 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory72.id) AND (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
155. 0.000 0.000 ↓ 0.0

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

156. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvtimesheetapprovalhistoryid (cost=0.00..1.63 rows=28 width=0) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory72.id)
157. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvuri (cost=0.00..4.96 rows=187 width=0) (actual rows= loops=)

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text)
158. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue74 (cost=0.43..2.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = sheetapprovalhistorykeyvalue73.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
159. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue75 (cost=0.43..2.80 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue74.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
160. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue76 (cost=0.43..1.57 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue75.id)
161. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue77 (cost=0.43..0.55 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue76.id)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
162. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue78 (cost=0.43..1.67 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue77.id)
163. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue70 (cost=0.43..0.53 rows=4 width=88) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue78.id)
164. 0.000 0.000 ↓ 0.0

Index Scan using ixtemrtimeentryid on timeentrymetadatarevision timeentrymetadatarevision79 (cost=39.98..87.89 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (timeentryid = timeentryrevision27.timeentryid)
  • Filter: ((fromtimestamputc <= timeentryrevision27.fromtimestamputc) AND ((totimestamputc > timeentryrevision27.fromtimestamputc) OR (totimestamputc IS NULL)) AND (((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:PROJECT'::text) AND (hashed SubPlan 18)) OR ((upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:TASK'::text) AND (hashed SubPlan 19))))
165.          

SubPlan (for Index Scan)

166. 0.000 0.000 ↓ 0.0

Nested Loop (cost=32.85..35.70 rows=6 width=32) (actual rows= loops=)

167. 0.000 0.000 ↓ 0.0

HashAggregate (cost=32.56..32.62 rows=6 width=4) (actual rows= loops=)

  • Group Key: resentativeprojectassignment81.projectid
168. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.30..32.55 rows=6 width=4) (actual rows= loops=)

169. 0.000 0.000 ↓ 0.0

Index Scan using uix2cr_clientuser on clientrepresentative clientrepresentative82 (cost=0.15..19.01 rows=8 width=16) (actual rows= loops=)

  • Index Cond: (userid = 234)
170. 0.000 0.000 ↓ 0.0

Index Scan using ixcrpaclientrepresentativeid on clientrepresentativeprojectassignment resentativeprojectassignment81 (cost=0.15..1.63 rows=6 width=20) (actual rows= loops=)

  • Index Cond: (clientrepresentativeid = clientrepresentative82.id)
171. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project project80 (cost=0.29..0.50 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = resentativeprojectassignment81.projectid)
172. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.59..3.69 rows=1 width=32) (actual rows= loops=)

  • Join Filter: (task83.projectid = resentativeprojectassignment81_1.projectid)
173. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..3.31 rows=1 width=12) (actual rows= loops=)

174. 0.000 0.000 ↓ 0.0

Seq Scan on task task83 (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

175. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project project84 (cost=0.29..2.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = task83.projectid)
176. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.30..0.36 rows=1 width=4) (actual rows= loops=)

177. 0.000 0.000 ↓ 0.0

Index Scan using uixcr_clientrepresentativeproject on clientrepresentativeprojectassignment resentativeprojectassignment81_1 (cost=0.15..0.17 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (projectid = project84.id)
178. 0.000 0.000 ↓ 0.0

Index Scan using clientrepresentative_pkey on clientrepresentative clientrepresentative82_1 (cost=0.15..0.18 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = resentativeprojectassignment81_1.clientrepresentativeid)
  • Filter: (userid = 234)
179. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.40..22.83 rows=1 width=32) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.12..18.56 rows=12 width=84) (actual rows= loops=)

181. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.77 rows=1 width=4) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..4.59 rows=1 width=20) (actual rows= loops=)

183. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest88 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 234)
184. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalnodes_pkey on timesheetapprovalnodes timesheetapprovalnodes87 (cost=0.28..2.29 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequest88.nodeid)
185. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet86 (cost=0.29..0.89 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes87.timesheetid)
  • Filter: ((startdate <= timeentryrevision27.entrydate) AND (enddate >= timeentryrevision27.entrydate) AND (userid = timeentryrevision27.userid))
186. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue85 (cost=0.28..12.67 rows=12 width=88) (actual rows= loops=)

  • Index Cond: (tsapprovalrequestid = tsapprovalrequest88.id)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
187. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue89 (cost=0.28..0.36 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue85.parentid)
  • Filter: (parentid IS NULL)
188. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.14..35.48 rows=1 width=32) (actual rows= loops=)

189. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.71..34.91 rows=1 width=16) (actual rows= loops=)

190. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9.28..33.20 rows=1 width=16) (actual rows= loops=)

191. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.85..32.64 rows=1 width=16) (actual rows= loops=)

192. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.43..31.03 rows=1 width=16) (actual rows= loops=)

193. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8.00..28.22 rows=1 width=16) (actual rows= loops=)

194. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.57..25.77 rows=1 width=16) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..17.87 rows=1 width=16) (actual rows= loops=)

196. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet91 (cost=0.29..4.41 rows=3 width=16) (actual rows= loops=)

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

Index Scan using ixtah2timesheetid on timesheetapprovalhistory timesheetapprovalhistory92 (cost=0.42..4.48 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (timesheetid = timesheet91.id)
  • Filter: (userid = 234)
198. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue93 (cost=6.87..7.89 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory92.id) AND (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
199. 0.000 0.000 ↓ 0.0

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

200. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvtimesheetapprovalhistoryid (cost=0.00..1.63 rows=28 width=0) (actual rows= loops=)

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory92.id)
201. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixtahkvuri (cost=0.00..4.96 rows=187 width=0) (actual rows= loops=)

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:A767CD9BFF05407A9D98C988F93A21DB:USER:234'::text)
202. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue94 (cost=0.43..2.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = sheetapprovalhistorykeyvalue93.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
203. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue95 (cost=0.43..2.80 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue94.parentid)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
204. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue96 (cost=0.43..1.57 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue95.id)
205. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue97 (cost=0.43..0.55 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue96.id)
  • Filter: (upper(uri) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text)
206. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue98 (cost=0.43..1.67 rows=4 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue97.id)
207. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue90 (cost=0.43..0.53 rows=4 width=88) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue98.id)
208. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=0.61..12,053.08 rows=798 width=4) (actual rows= loops=)

  • Merge Cond: (userhierarchy100.userid = timeoffs99.userid)
  • Filter: (((userhierarchy100.supervisorid = 234) AND ((userhierarchy100.startdate IS NULL) OR (userhierarchy100.startdate <= '2020-09-11'::date)) AND ((userhierarchy100.enddate IS NULL) OR (userhierarchy100.enddate >= '2020-09-11'::date))) OR (timeoffs99.userid = 234) OR (alternatives: SubPlan 24 or hashed SubPlan 25) OR (alternatives: SubPlan 26 or hashed SubPlan 27) OR (SubPlan 28) OR (SubPlan 29))
209. 0.000 0.000 ↓ 0.0

Index Scan using ix3uh_usersuperstart on userhierarchy userhierarchy100 (cost=0.28..49.73 rows=830 width=24) (actual rows= loops=)

210. 0.000 0.000 ↓ 0.0

Index Scan using ixto4userid on timeoffs timeoffs99 (cost=0.28..48.02 rows=850 width=16) (actual rows= loops=)

211.          

SubPlan (for Merge Right Join)

212. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.30..11.23 rows=1 width=0) (actual rows= loops=)

213. 0.000 0.000 ↓ 0.0

Index Scan using ixtoantimeoffid on timeoffapprovalnodes timeoffapprovalnodes101 (cost=0.15..5.22 rows=4 width=16) (actual rows= loops=)

  • Index Cond: (timeoffid = timeoffs99.id)
214. 0.000 0.000 ↓ 0.0

Index Only Scan using uix2toaraidnid on timeoffapprovalrequest timeoffapprovalrequest102 (cost=0.15..1.42 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((approverid = 234) AND (nodeid = timeoffapprovalnodes101.id))
215. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.30..15.45 rows=7 width=4) (actual rows= loops=)

216. 0.000 0.000 ↓ 0.0

Index Only Scan using uix2toaraidnid on timeoffapprovalrequest timeoffapprovalrequest102_1 (cost=0.15..7.28 rows=7 width=16) (actual rows= loops=)

  • Index Cond: (approverid = 234)
217. 0.000 0.000 ↓ 0.0

Index Scan using timeoffapprovalnodes_pkey on timeoffapprovalnodes timeoffapprovalnodes101_1 (cost=0.15..1.17 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = timeoffapprovalrequest102_1.nodeid)
218. 0.000 0.000 ↓ 0.0

Index Scan using ixtoahtimeoffid on timeoffapprovalhistory timeoffapprovalhistory103 (cost=0.28..2.70 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (timeoffid = timeoffs99.id)
  • Filter: ((userid = 234) AND (action = ANY ('{2,3,4}'::integer[])))
219. 0.000 0.000 ↓ 0.0

Index Scan using ixtoahuserid on timeoffapprovalhistory timeoffapprovalhistory103_1 (cost=0.28..5.05 rows=2 width=4) (actual rows= loops=)

  • Index Cond: (userid = 234)
  • Filter: (action = ANY ('{2,3,4}'::integer[]))
220. 0.000 0.000 ↓ 0.0

CTE Scan on timesheet0cte timesheet104 (cost=0.00..0.06 rows=1 width=0) (actual rows= loops=)

  • Filter: ((timeoffs99.startdate <= enddate2) AND (timeoffs99.enddate >= startdate1) AND (userid0 = timeoffs99.userid) AND ((('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text = upper(key3)) AND ('URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text = upper(uri4))) OR (('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text = upper(key3)) AND (upper(('urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:time-off:'::text || COALESCE((timeoffs99.id)::text, ''::text))) = upper(uri4)))))
221. 0.000 0.000 ↓ 0.0

CTE Scan on timesheet5cte timesheet105 (cost=0.00..0.06 rows=1 width=0) (actual rows= loops=)

  • Filter: ((timeoffs99.startdate <= enddate7) AND (timeoffs99.enddate >= startdate6) AND (userid5 = timeoffs99.userid) AND ((('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text = upper(uri8)) AND ('URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text = upper(uri9))) OR (('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text = upper(uri8)) AND (upper(('urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:time-off:'::text || COALESCE((timeoffs99.id)::text, ''::text))) = upper(uri9)))))
222. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=1,176,576,393.72..1,176,576,406.71 rows=2 width=64) (actual rows= loops=)

  • Filter: ((hashed SubPlan 23) OR (hashed SubPlan 30))
223. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..13.52 rows=2 width=140) (actual rows= loops=)

224. 0.000 0.000 ↓ 0.0

Index Scan using ixto4userid on timeoffs toff (cost=0.28..5.29 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (userid = 194)
225. 0.000 0.000 ↓ 0.0

Index Scan using uix2toe_timeoffidentrydate on timeoffentries toe (cost=0.28..2.05 rows=1 width=28) (actual rows= loops=)

  • Index Cond: ((timeoffid = toff.id) AND (entrydate >= '2020-06-01'::date) AND (entrydate <= '2020-09-11'::date))
226. 0.000 0.000 ↓ 0.0

Index Scan using ixtem2timeentryid on timeentrymetadata timeentrymetadata24 (cost=0.56..2.58 rows=1 width=74) (actual rows= loops=)

  • Index Cond: (("*SELECT* 1".timeentryid = timeentryid) AND (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:BREAK-TYPE'::text))
227. 0.000 0.000 ↓ 0.0

Index Scan using ixtem2timeentryid on timeentrymetadata timeentrymetadata22 (cost=0.56..2.58 rows=1 width=74) (actual rows= loops=)

  • Index Cond: (("*SELECT* 1".timeentryid = timeentryid) AND (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:TASK'::text))
228. 0.000 0.000 ↓ 0.0

Index Scan using ixtem2timeentryid on timeentrymetadata timeentrymetadata20 (cost=0.56..2.58 rows=1 width=74) (actual rows= loops=)

  • Index Cond: (("*SELECT* 1".timeentryid = timeentryid) AND (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:PROJECT'::text))
229. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project project21 (cost=0.30..0.32 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = CASE WHEN ("substring"(timeentrymetadata20.uri, '^urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:project:(.*)$'::text) ~ '^\s*[-]?[0-9]+\s*$'::text) THEN ("substring"(timeentrymetadata20.uri, '^urn:replicon-tenant:a767cd9bff05407a9d98c988f93a21db:project:(.*)$'::text))::integer ELSE NULL::integer END)
230. 0.000 0.000 ↓ 0.0

Hash (cost=1.01..1.01 rows=1 width=8) (actual rows= loops=)

231. 0.000 0.000 ↓ 0.0

Seq Scan on task task23 (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

232. 0.000 0.000 ↓ 0.0

Hash (cost=668.09..668.09 rows=8,709 width=39) (actual rows= loops=)

233. 0.000 0.000 ↓ 0.0

Seq Scan on project pj (cost=0.00..668.09 rows=8,709 width=39) (actual rows= loops=)

234. 0.000 0.000 ↓ 0.0

Hash (cost=3.19..3.19 rows=1 width=10) (actual rows= loops=)

235. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.14..3.19 rows=1 width=10) (actual rows= loops=)

236. 0.000 0.000 ↓ 0.0

Seq Scan on task tk (cost=0.00..1.01 rows=1 width=14) (actual rows= loops=)

237. 0.000 0.000 ↓ 0.0

Index Scan using uix3er_currencyideffectivedate on exchangerate (cost=0.14..2.17 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((variablecurrencyid = $13) AND (tk.estimatedcostcurrencyid = fixedcurrencyid) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
238. 0.000 0.000 ↓ 0.0

Hash (cost=1.02..1.02 rows=2 width=38) (actual rows= loops=)

239. 0.000 0.000 ↓ 0.0

Seq Scan on billingrate billingrate19 (cost=0.00..1.02 rows=2 width=38) (actual rows= loops=)