explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lW3v

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

Unique (cost=8,708,413,044.70..8,708,413,048.50 rows=380 width=37) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=8,708,413,044.70..8,708,413,045.65 rows=380 width=37) (actual rows= loops=)

  • Sort Key: ((CASE WHEN (NOT userinfo0.duplicatename) THEN (((userinfo0.lastname)::text || ', '::text) || (userinfo0.firstname)::text) ELSE ((((((userinfo0.lastname)::text || ', '::text) || (userinfo0.firstname)::text) || ' ('::text) || (login1.loginname)::text) || ')'::text) END)::text) COLLATE "en_US", userinfo0.id, userinfo0.disabled
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=8,708,412,588.89..8,708,413,028.42 rows=380 width=37) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Merge Join (cost=8,708,412,588.61..8,708,412,897.33 rows=380 width=27) (actual rows= loops=)

  • Merge Cond: (departmentusers2.userid = userinfo0.id)
5. 0.000 0.000 ↓ 0.0

Sort (cost=480.04..482.57 rows=1,013 width=8) (actual rows= loops=)

  • Sort Key: departmentusers2.userid
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=267.24..429.47 rows=1,013 width=8) (actual rows= loops=)

  • Hash Cond: (departmentusers2.userid = userhierarchy3.supervisorid)
7. 0.000 0.000 ↓ 0.0

Seq Scan on departmentusers departmentusers2 (cost=0.00..133.80 rows=4,880 width=4) (actual rows= loops=)

  • Filter: isprimarydepartment
8. 0.000 0.000 ↓ 0.0

Hash (cost=254.58..254.58 rows=1,013 width=4) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=244.45..254.58 rows=1,013 width=4) (actual rows= loops=)

  • Group Key: userhierarchy3.supervisorid
10. 0.000 0.000 ↓ 0.0

Seq Scan on userhierarchy userhierarchy3 (cost=0.00..229.29 rows=6,063 width=4) (actual rows= loops=)

  • Filter: ((startdate <= '2020-09-03'::date) AND (enddate >= '2020-09-03'::date))
11. 0.000 0.000 ↓ 0.0

Index Scan using userinfo_pkey on userinfo userinfo0 (cost=8,708,412,108.57..8,708,412,457.07 rows=2,275 width=19) (actual rows= loops=)

  • Filter: ((NOT (hashed SubPlan 1)) AND ((hashed SubPlan 17) OR (hashed SubPlan 19)))
12.          

SubPlan (for Index Scan)

13. 0.000 0.000 ↓ 0.0

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

14. 0.000 0.000 ↓ 0.0

Hash Join (cost=8,708,126,612.18..8,708,389,475.95 rows=3,553,195 width=4) (actual rows= loops=)

  • Hash Cond: (timeentry6.userid = userhierarchy5.userid)
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=8,708,126,307.10..8,708,317,351.30 rows=3,628,762 width=4) (actual rows= loops=)

  • Hash Cond: (timeentry6.id = timeentryrevision7.timeentryid)
16. 0.000 0.000 ↓ 0.0

Seq Scan on timeentry timeentry6 (cost=0.00..132,890.92 rows=6,774,592 width=20) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=8,708,085,460.63..8,708,085,460.63 rows=3,267,718 width=16) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

HashAggregate (cost=8,708,052,783.45..8,708,085,460.63 rows=3,267,718 width=16) (actual rows= loops=)

  • Group Key: timeentryrevision7.timeentryid
19. 0.000 0.000 ↓ 0.0

Merge Join (cost=2,397.50..8,708,036,070.96 rows=6,684,994 width=16) (actual rows= loops=)

  • Merge Cond: (timeentryrevision7.id = timeentryrevision8.id)
20. 0.000 0.000 ↓ 0.0

Index Scan using timeentryrevision_pkey on timeentryrevision timeentryrevision7 (cost=0.56..767,975.33 rows=6,767,448 width=32) (actual rows= loops=)

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

Index Scan using timeentryrevision_pkey on timeentryrevision timeentryrevision8 (cost=2,396.94..8,707,137,568.50 rows=18,703,427 width=16) (actual rows= loops=)

  • Filter: ((hashed SubPlan 2) OR (userid = 4,522) OR (SubPlan 3) OR (SubPlan 4) OR (SubPlan 5) OR (SubPlan 6) OR ((SubPlan 9) AND ((SubPlan 10) OR (SubPlan 11))) OR ((SubPlan 14) AND ((SubPlan 15) OR (SubPlan 16))))
22.          

SubPlan (for Index Scan)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.54..2,265.10 rows=52,510 width=16) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..77.06 rows=151 width=16) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..47.18 rows=35 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Index Only Scan using departmentgroupflathierarchy_pkey on departmentgroupflathierarchy departmentgroupflathierarchy12 (cost=0.28..1.31 rows=2 width=16) (actual rows= loops=)

  • Index Cond: (parentid = '5b1a9f95-e64f-414c-9bcc-72e34fbc457a'::uuid)
27. 0.000 0.000 ↓ 0.0

Index Scan using ixudgdepartmentgroupid on userdepartmentgroup userdepartmentgroup11 (cost=0.28..22.69 rows=24 width=28) (actual rows= loops=)

  • Index Cond: (departmentgroupid = departmentgroupflathierarchy12.childid)
28. 0.000 0.000 ↓ 0.0

Index Only Scan using ixtsuseridstartdateenddate on timesheet timesheet10 (cost=0.42..0.81 rows=4 width=12) (actual rows= loops=)

  • Index Cond: ((userid = userdepartmentgroup11.userid) AND (startdate <= userdepartmentgroup11.enddate) AND (enddate >= userdepartmentgroup11.startdate))
29. 0.000 0.000 ↓ 0.0

Index Scan using ixter2userid on timeentryrevision timeentryrevision9 (cost=0.56..10.84 rows=365 width=24) (actual rows= loops=)

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

Nested Loop (cost=1.53..30.78 rows=3 width=32) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..22.88 rows=12 width=84) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..7.16 rows=1 width=4) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

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

34. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (userid = 4,522)
35. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = tsapprovalrequest16.nodeid)
36. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet14 (cost=0.42..1.96 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes15.timesheetid)
  • Filter: ((startdate <= timeentryrevision8.entrydate) AND (enddate >= timeentryrevision8.entrydate) AND (userid = timeentryrevision8.userid))
37. 0.000 0.000 ↓ 0.0

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

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

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

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

Nested Loop (cost=15.38..51.69 rows=1 width=32) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.82..50.85 rows=1 width=16) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.26..48.71 rows=1 width=16) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.70..47.90 rows=1 width=16) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.13..45.84 rows=1 width=16) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.57..42.44 rows=1 width=16) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.01..39.86 rows=1 width=16) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

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

47. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet19 (cost=0.42..5.60 rows=4 width=16) (actual rows= loops=)

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

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

  • Index Cond: (timesheetid = timesheet19.id)
  • Filter: (userid = 4,522)
49. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue21 (cost=11.16..12.19 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory20.id) AND (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
50. 0.000 0.000 ↓ 0.0

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

51. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory20.id)
52. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text)
53. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue22 (cost=0.56..2.59 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue23 (cost=0.56..3.39 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue24 (cost=0.56..1.97 rows=9 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue23.id)
56. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue25 (cost=0.56..0.80 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue26 (cost=0.56..2.05 rows=9 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue25.id)
58. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue18 (cost=0.56..0.75 rows=9 width=89) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue26.id)
59. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.53..24.55 rows=1 width=32) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..22.77 rows=1 width=84) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..7.16 rows=1 width=4) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

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

63. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (userid = 4,522)
64. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = tsapprovalrequest30.nodeid)
65. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet timesheet28 (cost=0.42..1.96 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = timesheetapprovalnodes29.timesheetid)
  • Filter: ((startdate <= timeentryrevision8.entrydate) AND (enddate >= timeentryrevision8.entrydate) AND (userid = timeentryrevision8.userid))
66. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue27 (cost=0.28..15.60 rows=1 width=88) (actual rows= loops=)

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

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

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

Nested Loop (cost=15.38..51.71 rows=1 width=32) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.82..50.86 rows=1 width=16) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.26..48.71 rows=1 width=16) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.70..47.90 rows=1 width=16) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.13..45.84 rows=1 width=16) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.57..42.44 rows=1 width=16) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.01..39.86 rows=1 width=16) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

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

76. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet33 (cost=0.42..5.60 rows=4 width=16) (actual rows= loops=)

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

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

  • Index Cond: (timesheetid = timesheet33.id)
  • Filter: (userid = 4,522)
78. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue35 (cost=11.16..12.19 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory34.id) AND (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
79. 0.000 0.000 ↓ 0.0

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

80. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory34.id)
81. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text)
82. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue36 (cost=0.56..2.59 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue37 (cost=0.56..3.39 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue38 (cost=0.56..1.97 rows=9 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue37.id)
85. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue40 (cost=0.56..2.06 rows=9 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue32 (cost=0.56..0.75 rows=9 width=89) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue40.id)
88. 0.000 0.000 ↓ 0.0

Index Scan using ixtemrtimeentryid on timeentrymetadatarevision timeentrymetadatarevision41 (cost=131.96..155.89 rows=1 width=0) (actual rows= loops=)

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

SubPlan (for Index Scan)

90. 0.000 0.000 ↓ 0.0

Index Scan using ixprjprojectleaderapproverid on project project42 (cost=0.42..21.97 rows=20 width=32) (actual rows= loops=)

  • Index Cond: (projectleaderapproverid = 4,522)
91. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..109.27 rows=40 width=32) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Index Scan using ixprjprojectleaderapproverid on project project44 (cost=0.42..21.77 rows=20 width=4) (actual rows= loops=)

  • Index Cond: (projectleaderapproverid = 4,522)
93. 0.000 0.000 ↓ 0.0

Index Scan using ixtkprojectid on task task43 (cost=0.42..4.31 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (projectid = project44.id)
94. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.53..30.78 rows=3 width=32) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..22.88 rows=12 width=84) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..7.16 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 tsapprovalrequest48 (cost=0.27..2.29 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (userid = 4,522)
99. 0.000 0.000 ↓ 0.0

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

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

Index Scan using timesheet_pkey on timesheet timesheet46 (cost=0.42..1.96 rows=1 width=16) (actual rows= loops=)

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

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

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

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

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

Nested Loop (cost=15.38..51.69 rows=1 width=32) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.82..50.85 rows=1 width=16) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.26..48.71 rows=1 width=16) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.70..47.90 rows=1 width=16) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.13..45.84 rows=1 width=16) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.57..42.44 rows=1 width=16) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.01..39.86 rows=1 width=16) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

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

111. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet51 (cost=0.42..5.60 rows=4 width=16) (actual rows= loops=)

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

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

  • Index Cond: (timesheetid = timesheet51.id)
  • Filter: (userid = 4,522)
113. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue53 (cost=11.16..12.19 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory52.id) AND (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::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=11.16..11.16 rows=1 width=0) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text)
117. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue54 (cost=0.56..2.59 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = sheetapprovalhistorykeyvalue53.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 sheetapprovalhistorykeyvalue55 (cost=0.56..3.39 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue54.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 sheetapprovalhistorykeyvalue56 (cost=0.56..1.97 rows=9 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue57 (cost=0.56..0.80 rows=1 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue58 (cost=0.56..2.05 rows=9 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue50 (cost=0.56..0.75 rows=9 width=89) (actual rows= loops=)

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

Index Scan using ixtemrtimeentryid on timeentrymetadatarevision timeentrymetadatarevision59 (cost=84.26..108.19 rows=1 width=0) (actual rows= loops=)

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

SubPlan (for Index Scan)

125. 0.000 0.000 ↓ 0.0

Nested Loop (cost=32.98..39.98 rows=6 width=32) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

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

  • Group Key: resentativeprojectassignment61.projectid
127. 0.000 0.000 ↓ 0.0

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

128. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (userid = 4,522)
129. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (clientrepresentativeid = clientrepresentative62.id)
130. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project project60 (cost=0.42..1.22 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = resentativeprojectassignment61.projectid)
131. 0.000 0.000 ↓ 0.0

Nested Loop (cost=33.41..43.64 rows=23 width=32) (actual rows= loops=)

132. 0.000 0.000 ↓ 0.0

Nested Loop (cost=32.98..39.92 rows=6 width=8) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

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

  • Group Key: resentativeprojectassignment61_1.projectid
134. 0.000 0.000 ↓ 0.0

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

135. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (userid = 4,522)
136. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (clientrepresentativeid = clientrepresentative62_1.id)
137. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project project64 (cost=0.42..1.22 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = resentativeprojectassignment61_1.projectid)
138. 0.000 0.000 ↓ 0.0

Index Scan using ixtkprojectid on task task63 (cost=0.42..0.54 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (projectid = project64.id)
139. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.53..30.78 rows=3 width=32) (actual rows= loops=)

140. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..22.88 rows=12 width=84) (actual rows= loops=)

141. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.97..7.16 rows=1 width=4) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

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

143. 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 = 4,522)
144. 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)
145. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue65 (cost=0.28..15.60 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)
147. 0.000 0.000 ↓ 0.0

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

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

Nested Loop (cost=15.38..51.69 rows=1 width=32) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.82..50.85 rows=1 width=16) (actual rows= loops=)

150. 0.000 0.000 ↓ 0.0

Nested Loop (cost=14.26..48.71 rows=1 width=16) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.70..47.90 rows=1 width=16) (actual rows= loops=)

152. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.13..45.84 rows=1 width=16) (actual rows= loops=)

153. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.57..42.44 rows=1 width=16) (actual rows= loops=)

154. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.01..39.86 rows=1 width=16) (actual rows= loops=)

155. 0.000 0.000 ↓ 0.0

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

156. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet timesheet71 (cost=0.42..5.60 rows=4 width=16) (actual rows= loops=)

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

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

  • Index Cond: (timesheetid = timesheet71.id)
  • Filter: (userid = 4,522)
158. 0.000 0.000 ↓ 0.0

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

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

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

160. 0.000 0.000 ↓ 0.0

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

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

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:EC59310F04EB4B13A07D9DD6E7E07B8C:USER:4,522'::text)
162. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue74 (cost=0.56..2.59 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)
163. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue75 (cost=0.56..3.39 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)
164. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue76 (cost=0.56..1.97 rows=9 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue77 (cost=0.56..0.80 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)
166. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue78 (cost=0.56..2.05 rows=9 width=32) (actual rows= loops=)

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue70 (cost=0.56..0.75 rows=9 width=89) (actual rows= loops=)

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

Hash (cost=229.29..229.29 rows=6,063 width=8) (actual rows= loops=)

169. 0.000 0.000 ↓ 0.0

Seq Scan on userhierarchy userhierarchy5 (cost=0.00..229.29 rows=6,063 width=8) (actual rows= loops=)

  • Filter: ((startdate <= '2020-09-03'::date) AND (enddate >= '2020-09-03'::date))
170. 0.000 0.000 ↓ 0.0

Hash Join (cost=344.62..13,564.48 rows=73,543 width=4) (actual rows= loops=)

  • Hash Cond: (timeoffs80.userid = userhierarchy79.userid)
171. 0.000 0.000 ↓ 0.0

Merge Join (cost=92.47..11,975.36 rows=60,155 width=4) (actual rows= loops=)

  • Merge Cond: (timeoffs80.id = timeoffs81.id)
172. 0.000 0.000 ↓ 0.0

Index Scan using timeoffs_pkey on timeoffs timeoffs80 (cost=0.42..5,114.80 rows=120,292 width=8) (actual rows= loops=)

173. 0.000 0.000 ↓ 0.0

Index Scan using timeoffs_pkey on timeoffs timeoffs81 (cost=92.06..5,807.90 rows=60,155 width=4) (actual rows= loops=)

  • Filter: ((userid = 4,522) OR (hashed SubPlan 18))
174.          

SubPlan (for Index Scan)

175. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..91.45 rows=77 width=4) (actual rows= loops=)

176. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..47.18 rows=35 width=12) (actual rows= loops=)

177. 0.000 0.000 ↓ 0.0

Index Only Scan using departmentgroupflathierarchy_pkey on departmentgroupflathierarchy departmentgroupflathierarchy84 (cost=0.28..1.31 rows=2 width=16) (actual rows= loops=)

  • Index Cond: (parentid = '5b1a9f95-e64f-414c-9bcc-72e34fbc457a'::uuid)
178. 0.000 0.000 ↓ 0.0

Index Scan using ixudgdepartmentgroupid on userdepartmentgroup userdepartmentgroup83 (cost=0.28..22.69 rows=24 width=28) (actual rows= loops=)

  • Index Cond: (departmentgroupid = departmentgroupflathierarchy84.childid)
179. 0.000 0.000 ↓ 0.0

Index Scan using ixto4userid on timeoffs timeoffs82 (cost=0.42..1.24 rows=2 width=16) (actual rows= loops=)

  • Index Cond: ((userid = userdepartmentgroup83.userid) AND (userdepartmentgroup83.enddate >= startdate) AND (userdepartmentgroup83.startdate <= enddate))
180. 0.000 0.000 ↓ 0.0

Hash (cost=158.57..158.57 rows=7,486 width=8) (actual rows= loops=)

181. 0.000 0.000 ↓ 0.0

Index Only Scan using ix3uh_usersuperstart on userhierarchy userhierarchy79 (cost=0.28..158.57 rows=7,486 width=8) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Index Scan using login_pkey on login login1 (cost=0.28..0.33 rows=1 width=11) (actual rows= loops=)

  • Index Cond: (userid = departmentusers2.userid)