explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zcj6 : query (pull in main)

Settings
# exclusive inclusive rows x rows loops node
1. 1.301 32.294 ↑ 1.0 1 1

Limit (cost=25,093.10..25,093.10 rows=1 width=8) (actual time=30.995..32.294 rows=1 loops=1)

  • Output: (count(*))
  • Buffers: shared hit=14,027
2.          

CTE timesheet0cte

3. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.53..48.02 rows=1 width=76) (never executed)

  • Output: timesheet0.userid, timesheet0.startdate, timesheet0.enddate, tsapprovalrequestkeyvalue1.key, tsapprovalrequestkeyvalue1.uri
  • Inner Unique: true
4. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.25..45.84 rows=1 width=176) (never executed)

  • Output: timesheet0.userid, timesheet0.startdate, timesheet0.enddate, tsapprovalrequestkeyvalue1.key, tsapprovalrequestkeyvalue1.uri, tsapprovalrequestkeyvalue1.parentid
  • Inner Unique: true
5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.83..44.07 rows=1 width=180) (never executed)

  • Output: timesheetapprovalnodes2.timesheetid, tsapprovalrequestkeyvalue1.key, tsapprovalrequestkeyvalue1.uri, tsapprovalrequestkeyvalue1.parentid
  • Inner Unique: true
6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..41.77 rows=1 width=180) (never executed)

  • Output: tsapprovalrequest3.nodeid, tsapprovalrequestkeyvalue1.key, tsapprovalrequestkeyvalue1.uri, tsapprovalrequestkeyvalue1.parentid
7. 0.000 0.000 ↓ 0.0 0

Index Scan using uix2tsar_nodeid_userid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.tsapprovalrequest tsapprovalrequest3 (cost=0.27..5.04 rows=4 width=20) (never executed)

  • Output: tsapprovalrequest3.id, tsapprovalrequest3.effectivedateutc, tsapprovalrequest3.userid, tsapprovalrequest3.nodeid, tsapprovalrequest3.remindersentutc, tsapprovalrequest3.overduesentutc, tsapprovalrequest3.waitingbatchsentutc, tsapprovalrequest3.approvalagenttype, tsapprovalrequest3.systemprocessidentifier
  • Index Cond: (tsapprovalrequest3.userid = 2,892)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtsarkvtsapprovalrequestid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue1 (cost=0.28..9.17 rows=1 width=168) (never executed)

  • Output: tsapprovalrequestkeyvalue1.id, tsapprovalrequestkeyvalue1.tsapprovalrequestid, tsapprovalrequestkeyvalue1.parentid, tsapprovalrequestkeyvalue1.index, tsapprovalrequestkeyvalue1.key, tsapprovalrequestkeyvalue1.uri, tsapprovalrequestkeyvalue1.slug, tsapprovalrequestkeyvalue1."boolean", tsapprovalrequestkeyvalue1.date, tsapprovalrequestkeyvalue1.number, tsapprovalrequestkeyvalue1.text, tsapprovalrequestkeyvalue1."time", tsapprovalrequestkeyvalue1.timespan, tsapprovalrequestkeyvalue1.daterange_startdate, tsapprovalrequestkeyvalue1.daterange_enddate, tsapprovalrequestkeyvalue1.daterange_relativedaterangeuri, tsapprovalrequestkeyvalue1.daterange_relativedaterangeasofdate, tsapprovalrequestkeyvalue1.workdayduration_decimalworkdays, tsapprovalrequestkeyvalue1.workdayduration_workdays, tsapprovalrequestkeyvalue1.workdayduration_hours, tsapprovalrequestkeyvalue1.workdayduration_minutes
  • Index Cond: (tsapprovalrequestkeyvalue1.tsapprovalrequestid = tsapprovalrequest3.id)
  • Filter: ((upper(tsapprovalrequestkeyvalue1.key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text) OR ((upper(tsapprovalrequestkeyvalue1.key) = 'URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text) AND (upper(tsapprovalrequestkeyvalue1.uri) = 'URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text)))
9. 0.000 0.000 ↓ 0.0 0

Index Scan using timesheetapprovalnodes_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalnodes timesheetapprovalnodes2 (cost=0.28..2.29 rows=1 width=32) (never executed)

  • Output: timesheetapprovalnodes2.id, timesheetapprovalnodes2.isapproved, timesheetapprovalnodes2.approverrole, timesheetapprovalnodes2.userid, timesheetapprovalnodes2.timesheetid, timesheetapprovalnodes2.systemprocessidentifier, timesheetapprovalnodes2.scriptid, timesheetapprovalnodes2.agentresolutionstate
  • Index Cond: (timesheetapprovalnodes2.id = tsapprovalrequest3.nodeid)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using timesheet_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheet timesheet0 (cost=0.42..1.77 rows=1 width=28) (never executed)

  • Output: timesheet0.id, timesheet0.userid, timesheet0.startdate, timesheet0.enddate, timesheet0.approvalstatus, timesheet0.duedate, timesheet0.autosubmitdatetimeutc, timesheet0.lastautosubmitattemptdatetimeutc, timesheet0.createdonutc
  • Index Cond: (timesheet0.id = timesheetapprovalnodes2.timesheetid)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using tsapprovalrequestkeyvalue_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue4 (cost=0.28..2.16 rows=1 width=16) (never executed)

  • Output: tsapprovalrequestkeyvalue4.id, tsapprovalrequestkeyvalue4.tsapprovalrequestid, tsapprovalrequestkeyvalue4.parentid, tsapprovalrequestkeyvalue4.index, tsapprovalrequestkeyvalue4.key, tsapprovalrequestkeyvalue4.uri, tsapprovalrequestkeyvalue4.slug, tsapprovalrequestkeyvalue4."boolean", tsapprovalrequestkeyvalue4.date, tsapprovalrequestkeyvalue4.number, tsapprovalrequestkeyvalue4.text, tsapprovalrequestkeyvalue4."time", tsapprovalrequestkeyvalue4.timespan, tsapprovalrequestkeyvalue4.daterange_startdate, tsapprovalrequestkeyvalue4.daterange_enddate, tsapprovalrequestkeyvalue4.daterange_relativedaterangeuri, tsapprovalrequestkeyvalue4.daterange_relativedaterangeasofdate, tsapprovalrequestkeyvalue4.workdayduration_decimalworkdays, tsapprovalrequestkeyvalue4.workdayduration_workdays, tsapprovalrequestkeyvalue4.workdayduration_hours, tsapprovalrequestkeyvalue4.workdayduration_minutes
  • Index Cond: (tsapprovalrequestkeyvalue4.id = tsapprovalrequestkeyvalue1.parentid)
  • Filter: (tsapprovalrequestkeyvalue4.parentid IS NULL)
12.          

CTE timesheet5cte

13. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,072.54..9,127.21 rows=1 width=76) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, esheetapprovalhistorykeyvalue6.uri, esheetapprovalhistorykeyvalue7.uri
  • 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 0

Nested Loop (cost=1,072.11..9,126.61 rows=1 width=97) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, esheetapprovalhistorykeyvalue6.uri, sheetapprovalhistorykeyvalue13.id
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,071.68..9,124.87 rows=1 width=97) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, esheetapprovalhistorykeyvalue6.uri, esheetapprovalhistorykeyvalue6.id
16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,071.24..9,124.32 rows=1 width=28) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, sheetapprovalhistorykeyvalue12.id
17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,070.81..9,122.96 rows=1 width=28) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, sheetapprovalhistorykeyvalue11.id
18. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,070.38..9,120.85 rows=1 width=28) (never executed)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate, sheetapprovalhistorykeyvalue10.parentid
  • Inner Unique: true
19. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1,069.96..9,119.49 rows=1 width=32) (never executed)

  • Output: timesheetapprovalhistory8.timesheetid, sheetapprovalhistorykeyvalue10.parentid
  • Inner Unique: true
20. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1,069.53..9,059.87 rows=25 width=32) (never executed)

  • Output: timesheetapprovalhistory8.timesheetid, esheetapprovalhistorykeyvalue9.parentid
  • Inner Unique: true
  • Hash Cond: (esheetapprovalhistorykeyvalue9.timesheetapprovalhistoryid = timesheetapprovalhistory8.id)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvuri on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.56..7,976.99 rows=5,300 width=32) (never executed)

  • Output: esheetapprovalhistorykeyvalue9.id, esheetapprovalhistorykeyvalue9.timesheetapprovalhistoryid, esheetapprovalhistorykeyvalue9.parentid, esheetapprovalhistorykeyvalue9.index, esheetapprovalhistorykeyvalue9.key, esheetapprovalhistorykeyvalue9.uri, esheetapprovalhistorykeyvalue9.slug, esheetapprovalhistorykeyvalue9."boolean", esheetapprovalhistorykeyvalue9.date, esheetapprovalhistorykeyvalue9.number, esheetapprovalhistorykeyvalue9.text, esheetapprovalhistorykeyvalue9."time", esheetapprovalhistorykeyvalue9.timespan, esheetapprovalhistorykeyvalue9.daterange_startdate, esheetapprovalhistorykeyvalue9.daterange_enddate, esheetapprovalhistorykeyvalue9.daterange_relativedaterangeuri, esheetapprovalhistorykeyvalue9.daterange_relativedaterangeasofdate, esheetapprovalhistorykeyvalue9.workdayduration_decimalworkdays, esheetapprovalhistorykeyvalue9.workdayduration_workdays, esheetapprovalhistorykeyvalue9.workdayduration_hours, esheetapprovalhistorykeyvalue9.workdayduration_minutes
  • Index Cond: (upper(esheetapprovalhistorykeyvalue9.uri) = 'URN:REPLICON-TENANT:JSIPRODG3TRIAL:USER:2,892'::text)
  • Filter: (upper(esheetapprovalhistorykeyvalue9.key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
22. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,042.98..1,042.98 rows=2,079 width=32) (never executed)

  • Output: timesheetapprovalhistory8.timesheetid, timesheetapprovalhistory8.id
23. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahuserid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistory timesheetapprovalhistory8 (cost=0.42..1,042.98 rows=2,079 width=32) (never executed)

  • Output: timesheetapprovalhistory8.timesheetid, timesheetapprovalhistory8.id
  • Index Cond: (timesheetapprovalhistory8.userid = 2,892)
24. 0.000 0.000 ↓ 0.0 0

Index Scan using timesheetapprovalhistorykeyvalue_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue10 (cost=0.43..2.38 rows=1 width=32) (never executed)

  • Output: sheetapprovalhistorykeyvalue10.id, sheetapprovalhistorykeyvalue10.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue10.parentid, sheetapprovalhistorykeyvalue10.index, sheetapprovalhistorykeyvalue10.key, sheetapprovalhistorykeyvalue10.uri, sheetapprovalhistorykeyvalue10.slug, sheetapprovalhistorykeyvalue10."boolean", sheetapprovalhistorykeyvalue10.date, sheetapprovalhistorykeyvalue10.number, sheetapprovalhistorykeyvalue10.text, sheetapprovalhistorykeyvalue10."time", sheetapprovalhistorykeyvalue10.timespan, sheetapprovalhistorykeyvalue10.daterange_startdate, sheetapprovalhistorykeyvalue10.daterange_enddate, sheetapprovalhistorykeyvalue10.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue10.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue10.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue10.workdayduration_workdays, sheetapprovalhistorykeyvalue10.workdayduration_hours, sheetapprovalhistorykeyvalue10.workdayduration_minutes
  • Index Cond: (sheetapprovalhistorykeyvalue10.id = esheetapprovalhistorykeyvalue9.parentid)
  • Filter: (upper(sheetapprovalhistorykeyvalue10.uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-EXPECTED-APPROVAL-AGENT-USER'::text)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using timesheet_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheet timesheet5 (cost=0.42..1.35 rows=1 width=28) (never executed)

  • Output: timesheet5.id, timesheet5.userid, timesheet5.startdate, timesheet5.enddate, timesheet5.approvalstatus, timesheet5.duedate, timesheet5.autosubmitdatetimeutc, timesheet5.lastautosubmitattemptdatetimeutc, timesheet5.createdonutc
  • Index Cond: (timesheet5.id = timesheetapprovalhistory8.timesheetid)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvparentid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue11 (cost=0.43..2.10 rows=1 width=32) (never executed)

  • Output: sheetapprovalhistorykeyvalue11.id, sheetapprovalhistorykeyvalue11.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue11.parentid, sheetapprovalhistorykeyvalue11.index, sheetapprovalhistorykeyvalue11.key, sheetapprovalhistorykeyvalue11.uri, sheetapprovalhistorykeyvalue11.slug, sheetapprovalhistorykeyvalue11."boolean", sheetapprovalhistorykeyvalue11.date, sheetapprovalhistorykeyvalue11.number, sheetapprovalhistorykeyvalue11.text, sheetapprovalhistorykeyvalue11."time", sheetapprovalhistorykeyvalue11.timespan, sheetapprovalhistorykeyvalue11.daterange_startdate, sheetapprovalhistorykeyvalue11.daterange_enddate, sheetapprovalhistorykeyvalue11.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue11.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue11.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue11.workdayduration_workdays, sheetapprovalhistorykeyvalue11.workdayduration_hours, sheetapprovalhistorykeyvalue11.workdayduration_minutes
  • Index Cond: (sheetapprovalhistorykeyvalue11.parentid = sheetapprovalhistorykeyvalue10.parentid)
  • Filter: (upper(sheetapprovalhistorykeyvalue11.uri) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-METADATA'::text)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvparentid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue12 (cost=0.43..1.33 rows=3 width=32) (never executed)

  • Output: sheetapprovalhistorykeyvalue12.id, sheetapprovalhistorykeyvalue12.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue12.parentid, sheetapprovalhistorykeyvalue12.index, sheetapprovalhistorykeyvalue12.key, sheetapprovalhistorykeyvalue12.uri, sheetapprovalhistorykeyvalue12.slug, sheetapprovalhistorykeyvalue12."boolean", sheetapprovalhistorykeyvalue12.date, sheetapprovalhistorykeyvalue12.number, sheetapprovalhistorykeyvalue12.text, sheetapprovalhistorykeyvalue12."time", sheetapprovalhistorykeyvalue12.timespan, sheetapprovalhistorykeyvalue12.daterange_startdate, sheetapprovalhistorykeyvalue12.daterange_enddate, sheetapprovalhistorykeyvalue12.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue12.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue12.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue12.workdayduration_workdays, sheetapprovalhistorykeyvalue12.workdayduration_hours, sheetapprovalhistorykeyvalue12.workdayduration_minutes
  • Index Cond: (sheetapprovalhistorykeyvalue12.parentid = sheetapprovalhistorykeyvalue11.id)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvparentid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue6 (cost=0.43..0.55 rows=1 width=101) (never executed)

  • Output: esheetapprovalhistorykeyvalue6.id, esheetapprovalhistorykeyvalue6.timesheetapprovalhistoryid, esheetapprovalhistorykeyvalue6.parentid, esheetapprovalhistorykeyvalue6.index, esheetapprovalhistorykeyvalue6.key, esheetapprovalhistorykeyvalue6.uri, esheetapprovalhistorykeyvalue6.slug, esheetapprovalhistorykeyvalue6."boolean", esheetapprovalhistorykeyvalue6.date, esheetapprovalhistorykeyvalue6.number, esheetapprovalhistorykeyvalue6.text, esheetapprovalhistorykeyvalue6."time", esheetapprovalhistorykeyvalue6.timespan, esheetapprovalhistorykeyvalue6.daterange_startdate, esheetapprovalhistorykeyvalue6.daterange_enddate, esheetapprovalhistorykeyvalue6.daterange_relativedaterangeuri, esheetapprovalhistorykeyvalue6.daterange_relativedaterangeasofdate, esheetapprovalhistorykeyvalue6.workdayduration_decimalworkdays, esheetapprovalhistorykeyvalue6.workdayduration_workdays, esheetapprovalhistorykeyvalue6.workdayduration_hours, esheetapprovalhistorykeyvalue6.workdayduration_minutes
  • Index Cond: (esheetapprovalhistorykeyvalue6.parentid = sheetapprovalhistorykeyvalue12.id)
  • 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))
29. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvparentid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue13 (cost=0.43..1.71 rows=3 width=32) (never executed)

  • Output: sheetapprovalhistorykeyvalue13.id, sheetapprovalhistorykeyvalue13.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue13.parentid, sheetapprovalhistorykeyvalue13.index, sheetapprovalhistorykeyvalue13.key, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue13.slug, sheetapprovalhistorykeyvalue13."boolean", sheetapprovalhistorykeyvalue13.date, sheetapprovalhistorykeyvalue13.number, sheetapprovalhistorykeyvalue13.text, sheetapprovalhistorykeyvalue13."time", sheetapprovalhistorykeyvalue13.timespan, sheetapprovalhistorykeyvalue13.daterange_startdate, sheetapprovalhistorykeyvalue13.daterange_enddate, sheetapprovalhistorykeyvalue13.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue13.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue13.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue13.workdayduration_workdays, sheetapprovalhistorykeyvalue13.workdayduration_hours, sheetapprovalhistorykeyvalue13.workdayduration_minutes
  • Index Cond: (sheetapprovalhistorykeyvalue13.parentid = esheetapprovalhistorykeyvalue6.id)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtahkvparentid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue7 (cost=0.43..0.52 rows=3 width=85) (never executed)

  • Output: esheetapprovalhistorykeyvalue7.id, esheetapprovalhistorykeyvalue7.timesheetapprovalhistoryid, esheetapprovalhistorykeyvalue7.parentid, esheetapprovalhistorykeyvalue7.index, esheetapprovalhistorykeyvalue7.key, esheetapprovalhistorykeyvalue7.uri, esheetapprovalhistorykeyvalue7.slug, esheetapprovalhistorykeyvalue7."boolean", esheetapprovalhistorykeyvalue7.date, esheetapprovalhistorykeyvalue7.number, esheetapprovalhistorykeyvalue7.text, esheetapprovalhistorykeyvalue7."time", esheetapprovalhistorykeyvalue7.timespan, esheetapprovalhistorykeyvalue7.daterange_startdate, esheetapprovalhistorykeyvalue7.daterange_enddate, esheetapprovalhistorykeyvalue7.daterange_relativedaterangeuri, esheetapprovalhistorykeyvalue7.daterange_relativedaterangeasofdate, esheetapprovalhistorykeyvalue7.workdayduration_decimalworkdays, esheetapprovalhistorykeyvalue7.workdayduration_workdays, esheetapprovalhistorykeyvalue7.workdayduration_hours, esheetapprovalhistorykeyvalue7.workdayduration_minutes
  • Index Cond: (esheetapprovalhistorykeyvalue7.parentid = sheetapprovalhistorykeyvalue13.id)
31.          

Initplan (for Limit)

32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..11.37 rows=1 width=0) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Index Only Scan using userpolicyset_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.userpolicyset userpolicyset20 (cost=0.29..3.23 rows=2 width=16) (never executed)

  • Output: userpolicyset20.userid, userpolicyset20.policysetid
  • Index Cond: (userpolicyset20.userid = 2,892)
  • Heap Fetches: 0
34. 0.000 0.000 ↓ 0.0 0

Index Scan using ixpskvpolicysetid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.policysetkeyvalue policysetkeyvalue21 (cost=0.14..4.06 rows=1 width=16) (never executed)

  • Output: policysetkeyvalue21.id, policysetkeyvalue21.policysetid, policysetkeyvalue21.parentid, policysetkeyvalue21.index, policysetkeyvalue21.key, policysetkeyvalue21.uri, policysetkeyvalue21.slug, policysetkeyvalue21."boolean", policysetkeyvalue21.date, policysetkeyvalue21.number, policysetkeyvalue21.text, policysetkeyvalue21."time", policysetkeyvalue21.timespan, policysetkeyvalue21.daterange_startdate, policysetkeyvalue21.daterange_enddate, policysetkeyvalue21.daterange_relativedaterangeuri, policysetkeyvalue21.daterange_relativedaterangeasofdate, policysetkeyvalue21.workdayduration_decimalworkdays, policysetkeyvalue21.workdayduration_workdays, policysetkeyvalue21.workdayduration_hours, policysetkeyvalue21.workdayduration_minutes
  • Index Cond: (policysetkeyvalue21.policysetid = userpolicyset20.policysetid)
  • Filter: ((policysetkeyvalue21.parentid IS NULL) AND (upper(policysetkeyvalue21.key) = 'URN:REPLICON:POLICY:TIME-OFF:CAN-USER-VIEW-ALL-TIME-OFF'::text) AND (upper(policysetkeyvalue21.uri) = 'URN:REPLICON:POLICY:TIME-OFF:CAN-USER-VIEW-ALL-TIME-OFF:ALLOWED'::text))
35. 0.033 30.993 ↑ 1.0 1 1

Sort (cost=15,906.50..15,906.51 rows=1 width=8) (actual time=30.993..30.993 rows=1 loops=1)

  • Output: (count(*))
  • Sort Key: (count(*))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=14,027
36. 0.008 30.960 ↑ 1.0 1 1

Aggregate (cost=15,906.48..15,906.49 rows=1 width=8) (actual time=30.960..30.960 rows=1 loops=1)

  • Output: count(*)
  • Buffers: shared hit=14,024
37. 0.013 30.952 ↓ 1.4 13 1

Nested Loop Semi Join (cost=1,017.30..15,906.46 rows=9 width=0) (actual time=7.642..30.952 rows=13 loops=1)

  • Buffers: shared hit=14,024
38. 0.236 30.744 ↑ 1.5 13 1

Nested Loop (cost=1,016.59..15,664.91 rows=19 width=8) (actual time=7.589..30.744 rows=13 loops=1)

  • Output: "*SELECT* 1".timeoffid, timeoffapprovalnodes25.timeoffid
  • Join Filter: ("*SELECT* 1".timeoffid = timeoffapprovalnodes25.timeoffid)
  • Rows Removed by Join Filter: 3,354
  • Buffers: shared hit=13,860
39. 0.006 0.127 ↑ 1.0 13 1

Unique (cost=16.31..16.38 rows=13 width=4) (actual time=0.121..0.127 rows=13 loops=1)

  • Output: timeoffapprovalnodes25.timeoffid
  • Buffers: shared hit=20
40. 0.013 0.121 ↑ 1.0 13 1

Sort (cost=16.31..16.35 rows=13 width=4) (actual time=0.119..0.121 rows=13 loops=1)

  • Output: timeoffapprovalnodes25.timeoffid
  • Sort Key: timeoffapprovalnodes25.timeoffid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=20
41. 0.036 0.108 ↑ 1.0 13 1

Hash Join (cost=7.35..16.07 rows=13 width=4) (actual time=0.058..0.108 rows=13 loops=1)

  • Output: timeoffapprovalnodes25.timeoffid
  • Inner Unique: true
  • Hash Cond: (timeoffapprovalnodes25.id = timeoffapprovalrequest26.nodeid)
  • Buffers: shared hit=20
42. 0.034 0.034 ↑ 1.0 294 1

Seq Scan on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalnodes timeoffapprovalnodes25 (cost=0.00..7.94 rows=294 width=20) (actual time=0.005..0.034 rows=294 loops=1)

  • Output: timeoffapprovalnodes25.id, timeoffapprovalnodes25.timeoffid, timeoffapprovalnodes25.isapproved, timeoffapprovalnodes25.approverrole, timeoffapprovalnodes25.userid, timeoffapprovalnodes25.agentresolutionstate, timeoffapprovalnodes25.scriptid
  • Buffers: shared hit=5
43. 0.006 0.038 ↑ 1.0 13 1

Hash (cost=7.19..7.19 rows=13 width=16) (actual time=0.038..0.038 rows=13 loops=1)

  • Output: timeoffapprovalrequest26.nodeid
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=15
44. 0.032 0.032 ↑ 1.0 13 1

Index Scan using ixtoarapproverid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalrequest timeoffapprovalrequest26 (cost=0.27..7.19 rows=13 width=16) (actual time=0.022..0.032 rows=13 loops=1)

  • Output: timeoffapprovalrequest26.nodeid
  • Index Cond: (timeoffapprovalrequest26.approverid = 2,892)
  • Buffers: shared hit=15
45. 0.189 30.381 ↑ 1.1 259 13

Materialize (cost=1,000.28..15,592.77 rows=289 width=4) (actual time=0.125..2.337 rows=259 loops=13)

  • Output: "*SELECT* 1".timeoffid
  • Buffers: shared hit=13,840
46. 0.025 30.192 ↑ 1.1 259 1

Append (cost=1,000.28..15,591.32 rows=289 width=4) (actual time=1.629..30.192 rows=259 loops=1)

  • Buffers: shared hit=13,840
47. 0.000 29.705 ↑ 1.0 254 1

Subquery Scan on *SELECT* 1 (cost=1,000.28..15,448.55 rows=254 width=4) (actual time=1.629..29.705 rows=254 loops=1)

  • Output: "*SELECT* 1".timeoffid
  • Buffers: shared hit=13,715
48. 8.145 30.968 ↑ 1.0 254 1

Gather (cost=1,000.28..15,446.01 rows=254 width=1,553) (actual time=1.628..30.968 rows=254 loops=1)

  • Output: dm_timeofflist_facts.timeoffid, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::boolean, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::integer, NULL::date, NULL::date, NULL::integer, NULL::integer, NULL::interval, NULL::interval, NULL::time without time zone, NULL::time without time zone, NULL::interval, NULL::numeric(19,4), NULL::interval, NULL::timestamp without time zone, NULL::integer, NULL::text, NULL::text, NULL::timestamp without time zone, NULL::character varying(255), NULL::character varying(255), NULL::integer
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=13,715
49. 0.086 22.823 ↑ 1.2 85 3 / 3

Nested Loop Anti Join (cost=0.28..14,420.61 rows=106 width=1,553) (actual time=0.429..22.823 rows=85 loops=3)

  • Output: dm_timeofflist_facts.timeoffid, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::boolean, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::integer, NULL::date, NULL::date, NULL::integer, NULL::integer, NULL::interval, NULL::interval, NULL::time without time zone, NULL::time without time zone, NULL::interval, NULL::numeric(19,4), NULL::interval, NULL::timestamp without time zone, NULL::integer, NULL::text, NULL::text, NULL::timestamp without time zone, NULL::character varying(255), NULL::character varying(255), NULL::integer
  • Buffers: shared hit=13,715
  • Worker 0: actual time=0.508..20.195 rows=62 loops=1
  • Buffers: shared hit=3,987
  • Worker 1: actual time=0.717..20.290 rows=69 loops=1
  • Buffers: shared hit=3,990
50. 22.564 22.564 ↑ 1.2 86 3 / 3

Parallel Seq Scan on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.dm_timeofflist_facts (cost=0.00..14,375.66 rows=107 width=4) (actual time=0.418..22.564 rows=86 loops=3)

  • Output: dm_timeofflist_facts.timeoffid, dm_timeofflist_facts.timeoffslug, dm_timeofflist_facts.timeoffowneruserid, dm_timeofflist_facts.timeoffowneruserdisplayname, dm_timeofflist_facts.timeoffowneruserslug, dm_timeofflist_facts.timeoffowneruserenabled, dm_timeofflist_facts.timeoffownerdepartmentid, dm_timeofflist_facts.timeoffownerdepartmentdisplayname, dm_timeofflist_facts.timeoffownerdepartmentslug, dm_timeofflist_facts.timeoffownersupervisoruserid, dm_timeofflist_facts.timeoffownersupervisoruserdisplayname, dm_timeofflist_facts.timeoffownersupervisoruserslug, dm_timeofflist_facts.timeoffcodeid, dm_timeofflist_facts.timeoffcodedisplayname, dm_timeofflist_facts.timeoffcodeslug, dm_timeofflist_facts.approvalstatus, dm_timeofflist_facts.timeoffstatus, dm_timeofflist_facts.startdate, dm_timeofflist_facts.enddate, dm_timeofflist_facts.startdaydurationtype, dm_timeofflist_facts.enddaydurationtype, dm_timeofflist_facts.startdayduration, dm_timeofflist_facts.enddayduration, dm_timeofflist_facts.startdaystarttime, dm_timeofflist_facts.enddayendtime, dm_timeofflist_facts.totalduration, dm_timeofflist_facts.effectivehoursperday, dm_timeofflist_facts.lastactiondatetimeutc, dm_timeofflist_facts.waitingonapproveruserid, dm_timeofflist_facts.waitingonapproveruserslug, dm_timeofflist_facts.waitingonapproveruserdisplayname, dm_timeofflist_facts.generatedonutc, dm_timeofflist_facts.timeoffowneruseremployeeid, dm_timeofflist_facts.timeoffowneruserloginname, dm_timeofflist_facts.totalworkdayduration, dm_timeofflist_facts.displayformat
  • Filter: (dm_timeofflist_facts.timeoffstatus = 1)
  • Rows Removed by Filter: 76,436
  • Buffers: shared hit=13,180
  • Worker 0: actual time=0.495..19.937 rows=63 loops=1
  • Buffers: shared hit=3,848
  • Worker 1: actual time=0.706..20.045 rows=70 loops=1
  • Buffers: shared hit=3,848
51. 0.173 0.173 ↓ 0.0 0 259 / 3

Index Only Scan using dm_timeofflist_realtime_facts_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.dm_timeofflist_realtime_facts (cost=0.28..0.42 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=259)

  • Output: dm_timeofflist_realtime_facts.timeoffid
  • Index Cond: (dm_timeofflist_realtime_facts.timeoffid = dm_timeofflist_facts.timeoffid)
  • Heap Fetches: 1
  • Buffers: shared hit=535
  • Worker 0: actual time=0.003..0.003 rows=0 loops=63
  • Buffers: shared hit=139
  • Worker 1: actual time=0.003..0.003 rows=0 loops=70
  • Buffers: shared hit=142
52. 0.001 0.462 ↑ 7.0 5 1

Subquery Scan on *SELECT* 2 (cost=0.00..142.78 rows=35 width=4) (actual time=0.025..0.462 rows=5 loops=1)

  • Output: "*SELECT* 2".timeoffid
  • Buffers: shared hit=125
53. 0.461 0.461 ↑ 7.0 5 1

Seq Scan on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.dm_timeofflist_realtime_facts dm_timeofflist_realtime_facts_1 (cost=0.00..142.43 rows=35 width=1,553) (actual time=0.025..0.461 rows=5 loops=1)

  • Output: dm_timeofflist_realtime_facts_1.timeoffid, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::boolean, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::text, NULL::text, NULL::integer, NULL::integer, NULL::date, NULL::date, NULL::integer, NULL::integer, NULL::interval, NULL::interval, NULL::time without time zone, NULL::time without time zone, NULL::interval, NULL::numeric(19,4), NULL::interval, NULL::timestamp without time zone, NULL::integer, NULL::text, NULL::text, NULL::timestamp without time zone, NULL::character varying(255), NULL::character varying(255), NULL::integer
  • Filter: ((NOT dm_timeofflist_realtime_facts_1.deleted) AND (dm_timeofflist_realtime_facts_1.timeoffstatus = 1))
  • Rows Removed by Filter: 1,388
  • Buffers: shared hit=125
54. 0.020 0.195 ↑ 3.0 1 13

Nested Loop Left Join (cost=0.71..19.53 rows=3 width=4) (actual time=0.015..0.015 rows=1 loops=13)

  • Output: timeoffs15.id
  • Filter: (((userhierarchy16.supervisorid = 2,892) AND ((userhierarchy16.startdate IS NULL) OR (userhierarchy16.startdate <= '2020-02-09'::date)) AND ((userhierarchy16.enddate IS NULL) OR (userhierarchy16.enddate >= '2020-02-09'::date))) OR (timeoffs15.userid = 2,892) OR (alternatives: SubPlan 3 or hashed SubPlan 4) OR (alternatives: SubPlan 5 or hashed SubPlan 6) OR $19 OR (SubPlan 8) OR (SubPlan 9))
  • Buffers: shared hit=164
55. 0.052 0.052 ↑ 1.0 1 13

Index Scan using timeoffs_pkey on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffs timeoffs15 (cost=0.42..2.25 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=13)

  • Output: timeoffs15.id, timeoffs15.guidid, timeoffs15.userid, timeoffs15.createdbyuserid, timeoffs15.timeoffcodeid, timeoffs15.startdate, timeoffs15.enddate, timeoffs15.approvalstatus, timeoffs15.comments, timeoffs15.submittedonutc, timeoffs15.modifiedonutc, timeoffs15.info1, timeoffs15.info2, timeoffs15.info3, timeoffs15.info4, timeoffs15.info5, timeoffs15.startdurationtype, timeoffs15.enddurationtype, timeoffs15.startduration, timeoffs15.endduration, timeoffs15.startdatestarttime, timeoffs15.enddateendtime, timeoffs15.entryconfigurationmethod
  • Index Cond: (timeoffs15.id = "*SELECT* 1".timeoffid)
  • Buffers: shared hit=52
56. 0.039 0.039 ↑ 2.0 1 13

Index Scan using ix3uh_usersuperstart on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.userhierarchy userhierarchy16 (cost=0.29..0.32 rows=2 width=24) (actual time=0.003..0.003 rows=1 loops=13)

  • Output: userhierarchy16.id, userhierarchy16.userid, userhierarchy16.supervisorid, userhierarchy16.startdate, userhierarchy16.enddate
  • Index Cond: (userhierarchy16.userid = timeoffs15.userid)
  • Buffers: shared hit=39
57.          

SubPlan (for Nested Loop Left Join)

58. 0.024 0.084 ↑ 1.0 1 12

Nested Loop (cost=0.55..4.87 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=12)

  • Inner Unique: true
  • Buffers: shared hit=73
59. 0.024 0.024 ↑ 1.0 1 12

Index Scan using ixtoantimeoffid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalnodes timeoffapprovalnodes17 (cost=0.27..2.29 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=12)

  • Output: timeoffapprovalnodes17.id, timeoffapprovalnodes17.timeoffid, timeoffapprovalnodes17.isapproved, timeoffapprovalnodes17.approverrole, timeoffapprovalnodes17.userid, timeoffapprovalnodes17.agentresolutionstate, timeoffapprovalnodes17.scriptid
  • Index Cond: (timeoffapprovalnodes17.timeoffid = timeoffs15.id)
  • Buffers: shared hit=36
60. 0.036 0.036 ↑ 1.0 1 12

Index Only Scan using uix2toaraidnid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalrequest timeoffapprovalrequest18 (cost=0.27..2.29 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=12)

  • Output: timeoffapprovalrequest18.approverid, timeoffapprovalrequest18.nodeid
  • Index Cond: ((timeoffapprovalrequest18.approverid = 2,892) AND (timeoffapprovalrequest18.nodeid = timeoffapprovalnodes17.id))
  • Heap Fetches: 12
  • Buffers: shared hit=37
61. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=7.35..16.07 rows=13 width=4) (never executed)

  • Output: timeoffapprovalnodes17_1.timeoffid
  • Inner Unique: true
  • Hash Cond: (timeoffapprovalnodes17_1.id = timeoffapprovalrequest18_1.nodeid)
62. 0.000 0.000 ↓ 0.0 0

Seq Scan on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalnodes timeoffapprovalnodes17_1 (cost=0.00..7.94 rows=294 width=20) (never executed)

  • Output: timeoffapprovalnodes17_1.id, timeoffapprovalnodes17_1.timeoffid, timeoffapprovalnodes17_1.isapproved, timeoffapprovalnodes17_1.approverrole, timeoffapprovalnodes17_1.userid, timeoffapprovalnodes17_1.agentresolutionstate, timeoffapprovalnodes17_1.scriptid
63. 0.000 0.000 ↓ 0.0 0

Hash (cost=7.19..7.19 rows=13 width=16) (never executed)

  • Output: timeoffapprovalrequest18_1.nodeid
64. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtoarapproverid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalrequest timeoffapprovalrequest18_1 (cost=0.27..7.19 rows=13 width=16) (never executed)

  • Output: timeoffapprovalrequest18_1.nodeid
  • Index Cond: (timeoffapprovalrequest18_1.approverid = 2,892)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtoahtimeoffid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalhistory timeoffapprovalhistory19 (cost=0.42..3.47 rows=1 width=0) (never executed)

  • Index Cond: (timeoffapprovalhistory19.timeoffid = timeoffs15.id)
  • Filter: ((timeoffapprovalhistory19.userid = 2,892) AND (timeoffapprovalhistory19.action = ANY ('{2,3,4}'::integer[])))
66. 0.000 0.000 ↓ 0.0 0

Index Scan using ixtoahuserid on jsiprodg3trial_67c658be93d64a3fbc56f029e5ed9f6c.timeoffapprovalhistory timeoffapprovalhistory19_1 (cost=0.42..1,239.28 rows=657 width=4) (never executed)

  • Output: timeoffapprovalhistory19_1.timeoffid
  • Index Cond: (timeoffapprovalhistory19_1.userid = 2,892)
  • Filter: (timeoffapprovalhistory19_1.action = ANY ('{2,3,4}'::integer[]))
67. 0.000 0.000 ↓ 0.0 0

CTE Scan on timesheet0cte timesheet22 (cost=0.00..0.06 rows=1 width=0) (never executed)

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

CTE Scan on timesheet5cte timesheet23 (cost=0.00..0.06 rows=1 width=0) (never executed)

  • Filter: ((timeoffs15.startdate <= timesheet23.enddate7) AND (timeoffs15.enddate >= timesheet23.startdate6) AND (timesheet23.userid5 = timeoffs15.userid) AND ((('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-DATA-ACCESS-LEVELS'::text = upper(timesheet23.uri8)) AND ('URN:REPLICON:TIME-OFF-DATA-ACCESS-LEVEL:TIMESHEET-APPROVER'::text = upper(timesheet23.uri9))) OR (('URN:REPLICON:APPROVAL-REQUEST-METADATA-KEY:ADDITIONAL-APPROVER-ACCESSIBLE-OBJECTS'::text = upper(timesheet23.uri8)) AND (upper(('urn:replicon-tenant:jsiprodg3trial:time-off:'::text || COALESCE((timeoffs15.id)::text, ''::text))) = upper(timesheet23.uri9)))))
Planning time : 12.643 ms
Execution time : 32.843 ms