explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UYqE

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

Nested Loop (cost=1.14..17,287,506.63 rows=4,851 width=1,305) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.86..17,285,927.33 rows=4,839 width=64) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..253.31 rows=5,079 width=60) (actual rows= loops=)

  • Join Filter: (userinfo0.id <> systeminformation2.rootuserid)
4. 0.000 0.000 ↓ 0.0

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

5. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo0 (cost=0.00..188.80 rows=5,080 width=60) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..68,651.17 rows=826 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using ixata2userid on dm_attendancetimeallocation_facts ttendancetimeallocation_facts3 (cost=0.43..32.55 rows=853 width=20) (actual rows= loops=)

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

Index Scan using dm_attendancetimeallocation_facts_pkey on dm_attendancetimeallocation_facts ttendancetimeallocation_facts4 (cost=0.43..80.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = ttendancetimeallocation_facts3.id)
  • Filter: ((userid = 2,892) OR (alternatives: SubPlan 1 or hashed SubPlan 2) OR (SubPlan 3) OR (SubPlan 4) OR (SubPlan 5) OR (SubPlan 6))
9.          

SubPlan (for Index Scan)

10. 0.000 0.000 ↓ 0.0

Index Scan using ix3uh_usersuperstart on userhierarchy userhierarchy5 (cost=0.29..2.31 rows=1 width=0) (actual rows= loops=)

  • Index Cond: ((userid = ttendancetimeallocation_facts4.userid) AND (supervisorid = 2,892) AND (startdate <= '2020-09-01'::date))
  • Filter: (enddate >= '2020-09-01'::date)
11. 0.000 0.000 ↓ 0.0

Index Scan using ixuhsupervisorid on userhierarchy userhierarchy5_1 (cost=0.29..14.50 rows=7 width=4) (actual rows= loops=)

  • Index Cond: (supervisorid = 2,892)
  • Filter: ((startdate <= '2020-09-01'::date) AND (enddate >= '2020-09-01'::date))
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.82..27.07 rows=1 width=32) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..21.81 rows=11 width=83) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..11.18 rows=1 width=4) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..8.73 rows=1 width=20) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using ixtantimesheetid on timesheetapprovalnodes timesheetapprovalnodes8 (cost=0.29..3.32 rows=2 width=32) (actual rows= loops=)

  • Index Cond: (timesheetid = ttendancetimeallocation_facts4.timesheetid)
17. 0.000 0.000 ↓ 0.0

Index Scan using uix2tsar_nodeid_userid on tsapprovalrequest tsapprovalrequest9 (cost=0.28..2.30 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((userid = 2,892) AND (nodeid = timesheetapprovalnodes8.id))
18. 0.000 0.000 ↓ 0.0

Index Only Scan using timesheet_pkey on timesheet timesheet7 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = ttendancetimeallocation_facts4.timesheetid)
19. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvtsapprovalrequestid on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue6 (cost=0.42..10.51 rows=11 width=87) (actual rows= loops=)

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

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue10 (cost=0.42..0.48 rows=1 width=16) (actual rows= loops=)

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

Nested Loop (cost=18.72..33.09 rows=1 width=32) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=18.16..32.27 rows=1 width=16) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.60..30.42 rows=1 width=16) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.03..29.63 rows=1 width=16) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=16.47..27.84 rows=1 width=16) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.91..25.05 rows=1 width=16) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.35..22.47 rows=1 width=16) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..6.93 rows=1 width=16) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Index Only Scan using timesheet_pkey on timesheet timesheet12 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = ttendancetimeallocation_facts4.timesheetid)
30. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetid = ttendancetimeallocation_facts4.timesheetid)
  • Filter: (userid = 2,892)
31. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue14 (cost=14.50..15.52 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory13.id) AND (upper(uri) = 'URN:REPLICON-TENANT:DA44AF818B334610A7C953B93B406769:USER:2,892'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
32. 0.000 0.000 ↓ 0.0

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

33. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory13.id)
34. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:DA44AF818B334610A7C953B93B406769:USER:2,892'::text)
35. 0.000 0.000 ↓ 0.0

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

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

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

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue17 (cost=0.56..1.71 rows=8 width=32) (actual rows= loops=)

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

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

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue19 (cost=0.56..1.77 rows=8 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue18.id)
40. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue11 (cost=0.56..0.73 rows=8 width=87) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue19.id)
41. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.95..12.90 rows=1 width=32) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.53..10.47 rows=1 width=83) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.11..8.02 rows=1 width=99) (actual rows= loops=)

  • Join Filter: (tsapprovalrequest23.nodeid = timesheetapprovalnodes22.id)
44. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.82..4.67 rows=1 width=99) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Index Scan using ixtsarkvkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue20 (cost=0.42..1.44 rows=1 width=87) (actual rows= loops=)

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

Index Scan using tsapprovalrequest_pkey on tsapprovalrequest tsapprovalrequest23 (cost=0.41..2.43 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = tsapprovalrequestkeyvalue20.tsapprovalrequestid)
  • Filter: (userid = 2,892)
47. 0.000 0.000 ↓ 0.0

Index Scan using ixtantimesheetid on timesheetapprovalnodes timesheetapprovalnodes22 (cost=0.29..3.32 rows=2 width=32) (actual rows= loops=)

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

Index Only Scan using timesheet_pkey on timesheet timesheet21 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = ttendancetimeallocation_facts4.timesheetid)
49. 0.000 0.000 ↓ 0.0

Index Scan using tsapprovalrequestkeyvalue_pkey on tsapprovalrequestkeyvalue tsapprovalrequestkeyvalue24 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

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

Nested Loop (cost=18.72..40.98 rows=1 width=32) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Nested Loop (cost=18.16..40.16 rows=1 width=16) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.60..30.42 rows=1 width=16) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Nested Loop (cost=17.03..29.63 rows=1 width=16) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Nested Loop (cost=16.47..27.84 rows=1 width=16) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.91..25.05 rows=1 width=16) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Nested Loop (cost=15.35..22.47 rows=1 width=16) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..6.93 rows=1 width=16) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Index Only Scan using timesheet_pkey on timesheet timesheet26 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = ttendancetimeallocation_facts4.timesheetid)
59. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetid = ttendancetimeallocation_facts4.timesheetid)
  • Filter: (userid = 2,892)
60. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue28 (cost=14.50..15.52 rows=1 width=32) (actual rows= loops=)

  • Recheck Cond: ((timesheetapprovalhistoryid = timesheetapprovalhistory27.id) AND (upper(uri) = 'URN:REPLICON-TENANT:DA44AF818B334610A7C953B93B406769:USER:2,892'::text))
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:REMOVED-APPROVAL-REQUEST-NODES'::text)
61. 0.000 0.000 ↓ 0.0

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

62. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (timesheetapprovalhistoryid = timesheetapprovalhistory27.id)
63. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (upper(uri) = 'URN:REPLICON-TENANT:DA44AF818B334610A7C953B93B406769:USER:2,892'::text)
64. 0.000 0.000 ↓ 0.0

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

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

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

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue31 (cost=0.56..1.71 rows=8 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue30.id)
67. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue33 (cost=0.56..9.67 rows=8 width=32) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue32.id)
69. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvparentid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue25 (cost=0.56..0.73 rows=8 width=87) (actual rows= loops=)

  • Index Cond: (parentid = sheetapprovalhistorykeyvalue33.id)
70. 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 = userinfo0.id)