explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bI6c

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

Sort (cost=3,581,979.46..3,582,056.64 rows=30,872 width=4,545) (actual rows= loops=)

  • Sort Key: ((dep.code)::character varying(50)) COLLATE "en_US", ((dep.name)::character varying(255)) COLLATE "en_US", ((division1.name)::character varying(100)) COLLATE "en_US", userdivision2.startdate, ((ui.info35)::character varying(255)) COLLATE "en_US", ((ui.info3)::character varying(255)) COLLATE "en_US", ((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", ((ui.info41)::character varying(255)) COLLATE "en_US", ((cl.code)::character varying(50)) COLLATE "en_US", ((cl.name)::character varying(255)) COLLATE "en_US", ((pj.code)::character varying(50)) COLLATE "en_US", ((pj.name)::character varying(255)) COLLATE "en_US", ui.startdate, ui.enddate, ((date_part('year'::text, timeexpensecostbilling2_facts7.entrydatesheetdate))::integer), timeexpensecostbilling2_facts7.entrydatesheetdate, ((date_part('month'::text, timeexpensecostbilling2_facts7.entrydatesheetdate))::integer)
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=45,548.95..3,579,677.33 rows=30,872 width=4,545) (actual rows= loops=)

  • Join Filter: ("*SELECT* 1".expenseid = eh.expenseid)
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=45,492.19..3,575,655.84 rows=30,872 width=284) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=45,491.34..3,528,041.30 rows=30,872 width=292) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts7.projectid = project12.id)
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=27,698.89..3,509,743.33 rows=61,743 width=296) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,698.61..3,490,174.49 rows=61,743 width=282) (actual rows= loops=)

  • Hash Cond: (pj.clientid = cl.id)
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,441.17..3,489,754.80 rows=61,743 width=242) (actual rows= loops=)

  • Hash Cond: (userdivision2.divisionid = division1.id)
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=27,395.22..3,489,546.15 rows=61,743 width=233) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Join (cost=27,394.93..3,468,896.18 rows=61,743 width=213) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts7.userid = du.userid)
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=17,123.62..3,457,670.47 rows=89,098 width=173) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts7.expenseid = "*SELECT* 1".expenseid)
  • Filter: ((tslist.timesheetstatus = ANY ('{1,2,4}'::integer[])) OR ("*SELECT* 1".expensestatus = ANY ('{1,2,4}'::integer[])))
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=17,071.70..3,456,612.83 rows=92,799 width=177) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=17,070.86..3,355,626.57 rows=92,799 width=173) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts7.userid = ui.id)
13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=16,454.30..3,354,766.31 rows=92,799 width=102) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Subquery Scan on timeexpensecostbilling2_facts7 (cost=16,454.01..3,325,767.81 rows=92,799 width=68) (actual rows= loops=)

  • Filter: (((timeexpensecostbilling2_facts7.entrydatesheetdate >= '2018-09-01'::date) AND (timeexpensecostbilling2_facts7.entrydatesheetdate <= '2018-10-31'::date)) OR (timeexpensecostbilling2_facts7.entrydatesheetdate IS NULL))
15. 0.000 0.000 ↓ 0.0

Append (cost=16,454.01..3,186,219.99 rows=9,303,188 width=1,052) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Result (cost=16,454.01..1,318,536.62 rows=8,321,696 width=1,052) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Append (cost=16,454.01..1,193,711.18 rows=8,321,696 width=1,044) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=16,454.01..1,110,494.23 rows=8,321,695 width=3,435) (actual rows= loops=)

  • Hash Cond: ((at.projectid = ptm.projectid) AND (at.userid = ptm.userid) AND (at.entrydate = ptma.date))
19.          

Initplan (for Hash Left Join)

20. 0.000 0.000 ↓ 0.0

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

21. 0.000 0.000 ↓ 0.0

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

22. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15,575.29..589,509.56 rows=8,321,695 width=2,775) (actual rows= loops=)

  • Hash Cond: (at.taskid = tk.id)
23. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15,207.70..567,294.75 rows=8,321,695 width=2,771) (actual rows= loops=)

  • Hash Cond: (at.billingrateid = br.id)
24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15,206.66..530,503.37 rows=8,321,695 width=2,733) (actual rows= loops=)

  • Hash Cond: (pbr.id = pbrh.projectbillingrateid)
  • Join Filter: ((at.entrydate >= pbrh.effectivedate) AND (at.entrydate <= pbrh.enddate))
25. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=14,862.99..374,348.32 rows=8,321,695 width=2,738) (actual rows= loops=)

  • Hash Cond: ((at.projectid = pbr.projectid) AND (at.billingrateid = pbr.billingrateid))
  • Join Filter: (((pbr.billingrateid = $6) AND (at.userid = pbr.userid)) OR ((pbr.billingrateid <> $7) AND (pbr.userid IS NULL)))
26. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=14,489.54..257,614.94 rows=8,321,695 width=2,722) (actual rows= loops=)

  • Hash Cond: (at.projectid = pj_1.id)
27. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,360.40..234,634.69 rows=8,321,695 width=2,718) (actual rows= loops=)

  • Hash Cond: (at.timesheetid = ts_1.id)
28. 0.000 0.000 ↓ 0.0

Seq Scan on dm_projecttimeallocation_facts at (cost=0.00..199,311.83 rows=8,366,561 width=2,706) (actual rows= loops=)

  • Filter: ((timeoffcodeid IS NULL) AND (duration IS NOT NULL))
29. 0.000 0.000 ↓ 0.0

Hash (cost=8,341.29..8,341.29 rows=401,529 width=28) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet ts_1 (cost=0.00..8,341.29 rows=401,529 width=28) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=959.06..959.06 rows=13,606 width=8) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_1 (cost=0.00..959.06 rows=13,606 width=8) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=252.40..252.40 rows=8,070 width=40) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingrate pbr (cost=0.00..252.40 rows=8,070 width=40) (actual rows= loops=)

  • Filter: ((billingrateid = $6) OR ((billingrateid <> $7) AND (userid IS NULL)))
35. 0.000 0.000 ↓ 0.0

Hash (cost=209.41..209.41 rows=10,741 width=31) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingratehistory pbrh (cost=0.00..209.41 rows=10,741 width=31) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

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

38. 0.000 0.000 ↓ 0.0

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

39. 0.000 0.000 ↓ 0.0

Hash (cost=241.15..241.15 rows=10,115 width=8) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on task tk (cost=0.00..241.15 rows=10,115 width=8) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Hash (cost=858.85..858.85 rows=1,020 width=44) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..858.85 rows=1,020 width=44) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on projectteammemberallocation ptma (cost=0.00..20.20 rows=1,020 width=52) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Index Scan using projectteammember_pkey on projectteammember ptm (cost=0.29..0.82 rows=1 width=24) (actual rows= loops=)

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

Subquery Scan on *SELECT* 2_1 (cost=0.00..0.00 rows=1 width=1,044) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=1,044) (actual rows= loops=)

  • One-Time Filter: false
47. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=2.85..15.45 rows=1 width=1,052) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.85..15.44 rows=1 width=4,042) (actual rows= loops=)

  • Join Filter: (((ee.amount * ee.exchangevalue) * exchangerate.exchangevalue) IS NOT NULL)
49.          

Initplan (for Nested Loop)

50. 0.000 0.000 ↓ 0.0

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

51. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.70..14.14 rows=1 width=141) (actual rows= loops=)

  • Hash Cond: (ex_1.reimbursementcurrencyid = exchangerate.fixedcurrencyid)
  • Join Filter: ((ex_1.expensedate >= exchangerate.effectivedate) AND (ex_1.expensedate <= exchangerate.enddate))
52. 0.000 0.000 ↓ 0.0

Seq Scan on expense ex_1 (cost=0.00..11.10 rows=110 width=138) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Hash (cost=1.61..1.61 rows=7 width=19) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on exchangerate (cost=0.00..1.61 rows=7 width=19) (actual rows= loops=)

  • Filter: (variablecurrencyid = $5)
55. 0.000 0.000 ↓ 0.0

Index Scan using ixeeexpenseid on expenseentry ee (cost=0.14..0.26 rows=1 width=3,165) (actual rows= loops=)

  • Index Cond: (expenseid = ex_1.id)
56. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=0.00..0.01 rows=1 width=1,052) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.00 rows=0 width=1,044) (actual rows= loops=)

  • One-Time Filter: false
58. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=194,612.59..1,867,667.91 rows=981,490 width=941) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=194,612.59..1,852,945.56 rows=981,490 width=933) (actual rows= loops=)

60.          

Initplan (for Nested Loop Left Join)

61. 0.000 0.000 ↓ 0.0

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

62. 0.000 0.000 ↓ 0.0

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

63. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=194,610.13..581,703.11 rows=974,574 width=173) (actual rows= loops=)

  • Hash Cond: (bi.id = iibi.billingitemid)
64. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=194,576.06..579,110.78 rows=974,574 width=157) (actual rows= loops=)

  • Hash Cond: (bi.id = aggm.billingitemid)
  • Filter: (aggm.uri IS NULL)
65. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=194,573.90..568,975.57 rows=2,702,146 width=157) (actual rows= loops=)

  • Hash Cond: (bidm.timesheetid = t.id)
66. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=181,213.50..548,521.96 rows=2,702,146 width=145) (actual rows= loops=)

  • Hash Cond: (pbr_1.id = pbrh_1.projectbillingrateid)
  • Join Filter: ((bi.entrydate >= pbrh_1.effectivedate) AND (bi.entrydate <= pbrh_1.enddate))
67. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=180,869.83..497,584.61 rows=2,702,146 width=157) (actual rows= loops=)

  • Hash Cond: ((bidm.projectid = pbr_1.projectid) AND (bidm.billingrateid = pbr_1.billingrateid))
  • Join Filter: (((pbr_1.billingrateid = $3) AND (bidm.userid = pbr_1.userid)) OR ((pbr_1.billingrateid <> $4) AND (pbr_1.userid IS NULL)))
68. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=180,496.38..459,249.98 rows=2,702,146 width=157) (actual rows= loops=)

  • Hash Cond: (bidm.billingrateid = br_1.id)
69. 0.000 0.000 ↓ 0.0

Hash Join (cost=180,495.33..447,253.55 rows=2,702,146 width=119) (actual rows= loops=)

  • Hash Cond: (bidm.projectid = pj_2.id)
70. 0.000 0.000 ↓ 0.0

Hash Join (cost=180,016.88..439,679.79 rows=2,702,146 width=119) (actual rows= loops=)

  • Hash Cond: (bidm.billingitemid = bi.id)
  • Join Filter: (CASE WHEN (bidm.billingtypeuri = 'urn:replicon:billing-item-type:timesheet'::text) THEN bi.amount ELSE 0.0000::numeric(19,4) END IS NOT NULL)
71. 0.000 0.000 ↓ 0.0

Seq Scan on billingitem2denormalizedmetadata bidm (cost=0.00..237,700.03 rows=8,366,803 width=108) (actual rows= loops=)

  • Filter: (userid IS NOT NULL)
72. 0.000 0.000 ↓ 0.0

Hash (cost=146,071.11..146,071.11 rows=2,715,662 width=27) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Seq Scan on billingitem2 bi (cost=0.00..146,071.11 rows=2,715,662 width=27) (actual rows= loops=)

  • Filter: isbillable
74. 0.000 0.000 ↓ 0.0

Hash (cost=308.38..308.38 rows=13,606 width=4) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project pj_2 (cost=0.29..308.38 rows=13,606 width=4) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

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

77. 0.000 0.000 ↓ 0.0

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

78. 0.000 0.000 ↓ 0.0

Hash (cost=252.40..252.40 rows=8,070 width=40) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingrate pbr_1 (cost=0.00..252.40 rows=8,070 width=40) (actual rows= loops=)

  • Filter: ((billingrateid = $3) OR ((billingrateid <> $4) AND (userid IS NULL)))
80. 0.000 0.000 ↓ 0.0

Hash (cost=209.41..209.41 rows=10,741 width=24) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingratehistory pbrh_1 (cost=0.00..209.41 rows=10,741 width=24) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Hash (cost=8,341.29..8,341.29 rows=401,529 width=28) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet t (cost=0.00..8,341.29 rows=401,529 width=28) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Hash (cost=2.14..2.14 rows=1 width=85) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Index Scan using ixbiminvoicinghint on billingitem2metadata aggm (cost=0.12..2.14 rows=1 width=85) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Hash (cost=20.70..20.70 rows=1,070 width=32) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Seq Scan on invoiceitembillingitems iibi (cost=0.00..20.70 rows=1,070 width=32) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Index Scan using ixbimbillingitemidkey on billingitem2metadata bi2m (cost=0.43..1.23 rows=6 width=32) (actual rows= loops=)

  • Index Cond: (billingitemid = bi.id)
89. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj (cost=0.29..0.31 rows=1 width=34) (actual rows= loops=)

  • Index Cond: (timeexpensecostbilling2_facts7.projectid = id)
90. 0.000 0.000 ↓ 0.0

Hash (cost=488.47..488.47 rows=10,247 width=71) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui (cost=0.00..488.47 rows=10,247 width=71) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..1.08 rows=1 width=20) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = timeexpensecostbilling2_facts7.timesheetid)
94. 0.000 0.000 ↓ 0.0

Index Scan using dm_timesheetlist_facts_pkey on dm_timesheetlist_facts tslist (cost=0.42..0.59 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (timesheetid = ts.id)
95. 0.000 0.000 ↓ 0.0

Hash (cost=50.91..50.91 rows=81 width=8) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Hash Join (cost=26.07..50.91 rows=81 width=8) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".expenseid = ex.id)
97. 0.000 0.000 ↓ 0.0

Append (cost=13.60..38.21 rows=81 width=8) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=13.60..25.81 rows=1 width=8) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=13.60..25.80 rows=1 width=475) (actual rows= loops=)

  • Hash Cond: (dm_expenselist_facts.expenseid = dm_expenselist_realtime_facts.expenseid)
100. 0.000 0.000 ↓ 0.0

Seq Scan on dm_expenselist_facts (cost=0.00..11.60 rows=160 width=8) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash (cost=11.60..11.60 rows=160 width=4) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Seq Scan on dm_expenselist_realtime_facts (cost=0.00..11.60 rows=160 width=4) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.00..12.40 rows=80 width=8) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Seq Scan on dm_expenselist_realtime_facts dm_expenselist_realtime_facts_1 (cost=0.00..11.60 rows=80 width=475) (actual rows= loops=)

  • Filter: (NOT deleted)
105. 0.000 0.000 ↓ 0.0

Hash (cost=11.10..11.10 rows=110 width=4) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Seq Scan on expense ex (cost=0.00..11.10 rows=110 width=4) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Hash (cost=10,182.54..10,182.54 rows=7,101 width=44) (actual rows= loops=)

108. 0.000 0.000 ↓ 0.0

Hash Join (cost=477.23..10,182.54 rows=7,101 width=44) (actual rows= loops=)

  • Hash Cond: (du.departmentid = dep.id)
109. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on departmentusers du (cost=421.60..10,108.21 rows=7,101 width=8) (actual rows= loops=)

  • Recheck Cond: ((departmentid = ANY ('{1,2,3,319,320,4,127,318,13,14,323,322,324,321,325,189,255,266,263,258,851,267,259,262,313,264,256,260,257,261,265,132,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,626,627,620,621,149,153,790,239,144,147,154,151,145,155,624,156,789,133,454,312,150,146,625,316,143,148,248,157,152,555,556,622,623,170,173,455,240,246,171,245,168,254,243,169,172,488,179,788,180,174,247,283,278,253,178,182,12,19,20,17,15,16,18,337,628,6,123,192,24,22,124,23,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,7,106,114,207,349,995,126,110,209,999,136,1001,1002,203,1004,161,102,94,105,1009,214,113,211,213,236,100,93,315,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,340,1036,1037,177,191,342,343,190,344,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,994,1092,1093,1094,1095,1096,1097,950,1098,1099,983,984,985,986,987,988,989,990,1100,991,1123,1101,1102,1103,1104,1105,1106,1107,1108,1109,1122,1110,992,993,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,83,81,241,85,86,244,610,611,824,825,826,827,828,829,830,612,613,615,614,617,616,69,198,591,46,41,125,52,138,821,137,71,336,48,592,593,557,134,823,602,64,185,599,238,76,34,38,75,310,33,35,819,70,54,40,55,62,587,588,785,559,596,36,129,47,194,183,78,197,184,818,50,63,308,309,139,66,196,122,53,49,65,44,61,72,200,37,77,597,598,558,560,787,822,594,595,193,317,39,820,45,589,590,195,51,201,42,68,600,601,752,311,92,218,222,786,199,73,74,128,135,202,280,67,159,361,58,326,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,217,327,330,331,332,219,121,220,333,221,884,88,91,84,90,176,521,80,216,79,82,87,89,334,335,458,618,619,456,457,130,249,234,1196,1197,235,9,1243,1244,1245,1246,223,25,224,10,1247,1248,1249,1250,1251,1252,1253,1254,1255,226,225,227,231,26,230,229,228,8,210,111,362,108,112,237,103,186,95,96,109,104,101,98,204,206,175,205,215,99,107,208,140,212,242,97,338,339,720,724,341,345,346,723,686,347,348,350,351,352,354,355,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,353,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,721,719,359,722,725,360,363,364,365,366,367,653,368,369,673,679,370,371,372,373,374,375,376,654,655,377,378,379,380,381,656,382,383,674,680,384,385,386,387,388,389,390,657,658,604,391,392,393,394,115,395,659,660,396,397,398,661,399,400,675,681,401,402,403,404,405,406,407,605,662,663,408,409,410,411,412,413,414,415,416,417,418,419,420,609,607,421,422,423,424,425,426,427,428,429,430,664,676,682,665,666,431,432,433,434,435,436,437,438,667,668,439,440,441,677,683,443,444,445,446,447,448,449,450,603,669,670,608,451,671,678,684,672,452,453,606,5,28,27,116,117,160,118,158,120,119,11,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,356,357,21,1449,358,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523}'::integer[])) OR (departmentid = ANY ('{1524,1525,1526,232,233,167,164,30,188,187,166,32,162,29,31,142,163,306,554}'::integer[])))
110. 0.000 0.000 ↓ 0.0

BitmapOr (cost=421.60..421.60 rows=7,470 width=0) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on departmentusers_pkey (cost=0.00..391.50 rows=6,926 width=0) (actual rows= loops=)

  • Index Cond: (departmentid = ANY ('{1,2,3,319,320,4,127,318,13,14,323,322,324,321,325,189,255,266,263,258,851,267,259,262,313,264,256,260,257,261,265,132,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,1160,1161,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,626,627,620,621,149,153,790,239,144,147,154,151,145,155,624,156,789,133,454,312,150,146,625,316,143,148,248,157,152,555,556,622,623,170,173,455,240,246,171,245,168,254,243,169,172,488,179,788,180,174,247,283,278,253,178,182,12,19,20,17,15,16,18,337,628,6,123,192,24,22,124,23,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,7,106,114,207,349,995,126,110,209,999,136,1001,1002,203,1004,161,102,94,105,1009,214,113,211,213,236,100,93,315,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,340,1036,1037,177,191,342,343,190,344,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,994,1092,1093,1094,1095,1096,1097,950,1098,1099,983,984,985,986,987,988,989,990,1100,991,1123,1101,1102,1103,1104,1105,1106,1107,1108,1109,1122,1110,992,993,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,83,81,241,85,86,244,610,611,824,825,826,827,828,829,830,612,613,615,614,617,616,69,198,591,46,41,125,52,138,821,137,71,336,48,592,593,557,134,823,602,64,185,599,238,76,34,38,75,310,33,35,819,70,54,40,55,62,587,588,785,559,596,36,129,47,194,183,78,197,184,818,50,63,308,309,139,66,196,122,53,49,65,44,61,72,200,37,77,597,598,558,560,787,822,594,595,193,317,39,820,45,589,590,195,51,201,42,68,600,601,752,311,92,218,222,786,199,73,74,128,135,202,280,67,159,361,58,326,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,217,327,330,331,332,219,121,220,333,221,884,88,91,84,90,176,521,80,216,79,82,87,89,334,335,458,618,619,456,457,130,249,234,1196,1197,235,9,1243,1244,1245,1246,223,25,224,10,1247,1248,1249,1250,1251,1252,1253,1254,1255,226,225,227,231,26,230,229,228,8,210,111,362,108,112,237,103,186,95,96,109,104,101,98,204,206,175,205,215,99,107,208,140,212,242,97,338,339,720,724,341,345,346,723,686,347,348,350,351,352,354,355,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,353,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,721,719,359,722,725,360,363,364,365,366,367,653,368,369,673,679,370,371,372,373,374,375,376,654,655,377,378,379,380,381,656,382,383,674,680,384,385,386,387,388,389,390,657,658,604,391,392,393,394,115,395,659,660,396,397,398,661,399,400,675,681,401,402,403,404,405,406,407,605,662,663,408,409,410,411,412,413,414,415,416,417,418,419,420,609,607,421,422,423,424,425,426,427,428,429,430,664,676,682,665,666,431,432,433,434,435,436,437,438,667,668,439,440,441,677,683,443,444,445,446,447,448,449,450,603,669,670,608,451,671,678,684,672,452,453,606,5,28,27,116,117,160,118,158,120,119,11,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1421,1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,356,357,21,1449,358,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523}'::integer[]))
112. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on departmentusers_pkey (cost=0.00..26.55 rows=544 width=0) (actual rows= loops=)

  • Index Cond: (departmentid = ANY ('{1524,1525,1526,232,233,167,164,30,188,187,166,32,162,29,31,142,163,306,554}'::integer[]))
113. 0.000 0.000 ↓ 0.0

Hash (cost=41.39..41.39 rows=1,139 width=44) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Seq Scan on departments dep (cost=0.00..41.39 rows=1,139 width=44) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

Index Only Scan using ix4ud_userdivisionstartend on userdivision userdivision2 (cost=0.29..0.32 rows=1 width=28) (actual rows= loops=)

  • Index Cond: ((userid = timeexpensecostbilling2_facts7.userid) AND (startdate <= timeexpensecostbilling2_facts7.entrydatesheetdate) AND (enddate >= timeexpensecostbilling2_facts7.entrydatesheetdate))
116. 0.000 0.000 ↓ 0.0

Hash (cost=32.09..32.09 rows=1,109 width=41) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Seq Scan on division division1 (cost=0.00..32.09 rows=1,109 width=41) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Hash (cost=207.75..207.75 rows=3,975 width=44) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Seq Scan on clients cl (cost=0.00..207.75 rows=3,975 width=44) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Index Scan using login_pkey on login (cost=0.29..0.32 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (ui.id = userid)
121. 0.000 0.000 ↓ 0.0

Hash (cost=17,675.90..17,675.90 rows=9,324 width=4) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=77.41..17,675.90 rows=9,324 width=4) (actual rows= loops=)

  • Hash Cond: (project12.programid = program13.id)
  • Filter: ((program13.programmanagerid = 400) OR (programsharingassignment14.userid = 400))
123. 0.000 0.000 ↓ 0.0

Seq Scan on project project12 (cost=0.00..959.06 rows=13,606 width=20) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Hash (cost=50.09..50.09 rows=2,186 width=24) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1.65..50.09 rows=2,186 width=24) (actual rows= loops=)

  • Hash Cond: (programsharingassignment14.programid = program13.id)
126. 0.000 0.000 ↓ 0.0

Seq Scan on programsharingassignment programsharingassignment14 (cost=0.00..41.86 rows=2,186 width=20) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Hash (cost=1.29..1.29 rows=29 width=20) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Seq Scan on program program13 (cost=0.00..1.29 rows=29 width=20) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.85..1.53 rows=1 width=24) (actual rows= loops=)

  • Filter: ((tahls.timesheetid IS NULL) OR (tah.serialnumber > tahls.lastsubmitserialnumber))
130. 0.000 0.000 ↓ 0.0

Index Scan using ixtah2timesheetid on timesheetapprovalhistory tah (cost=0.43..0.61 rows=2 width=28) (actual rows= loops=)

  • Index Cond: (ts.id = timesheetid)
  • Filter: (((systemprocessidentifier IS NULL) OR (systemprocessidentifier <> 'urn:replicon:approval-system-process:timesheet-submit-script-data-and-validation'::text)) AND (action = ANY ('{2,3,6}'::integer[])))
131. 0.000 0.000 ↓ 0.0

Index Scan using timesheetapprovalhistorylastsubmit_pkey on timesheetapprovalhistorylastsubmit tahls (cost=0.42..0.45 rows=1 width=20) (actual rows= loops=)

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

Materialize (cost=56.76..2,786.61 rows=2 width=12) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=56.76..2,786.60 rows=2 width=12) (actual rows= loops=)

  • Join Filter: (kvar.exphistoryid = eh.id)
134. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=56.62..2,784.41 rows=2 width=16) (actual rows= loops=)

  • Join Filter: (effective.exphistoryid = eh.id)
135. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=56.47..2,782.21 rows=2 width=16) (actual rows= loops=)

  • Join Filter: (actual.exphistoryid = eh.id)
136. 0.000 0.000 ↓ 0.0

Index Scan using ix2exhexpenseidid on exphistory eh (cost=56.32..2,780.01 rows=2 width=16) (actual rows= loops=)

  • Filter: ((NOT (hashed SubPlan 1)) AND (id = (SubPlan 2)))
137.          

SubPlan (for Index Scan)

138. 0.000 0.000 ↓ 0.0

Merge Join (cost=0.30..54.47 rows=680 width=4) (actual rows= loops=)

  • Merge Cond: (ear.nodeid = ean.id)
139. 0.000 0.000 ↓ 0.0

Index Only Scan using uix2earnidaid on expenseapprovalrequest ear (cost=0.15..21.35 rows=680 width=16) (actual rows= loops=)

140. 0.000 0.000 ↓ 0.0

Index Scan using expenseapprovalnodes_pkey on expenseapprovalnodes ean (cost=0.15..22.70 rows=770 width=20) (actual rows= loops=)

141. 0.000 0.000 ↓ 0.0

Aggregate (cost=3.96..3.97 rows=1 width=4) (actual rows= loops=)

142. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on exphistory eh1 (cost=2.94..3.96 rows=1 width=4) (actual rows= loops=)

  • Recheck Cond: ((expenseid = eh.expenseid) AND (action = ANY ('{2,3,6}'::integer[])))
143. 0.000 0.000 ↓ 0.0

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

144. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ix2exhexpenseidid (cost=0.00..1.17 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (expenseid = eh.expenseid)
145. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ixexhaction (cost=0.00..1.52 rows=10 width=0) (actual rows= loops=)

  • Index Cond: (action = ANY ('{2,3,6}'::integer[]))
146. 0.000 0.000 ↓ 0.0

Materialize (cost=0.14..2.17 rows=1 width=36) (actual rows= loops=)

147. 0.000 0.000 ↓ 0.0

Index Scan using ixexahkvkey on expenseapprovalhistorykeyvalue actual (cost=0.14..2.16 rows=1 width=36) (actual rows= loops=)

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

Materialize (cost=0.14..2.17 rows=1 width=36) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Index Scan using ixexahkvkey on expenseapprovalhistorykeyvalue effective (cost=0.14..2.16 rows=1 width=36) (actual rows= loops=)

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

Materialize (cost=0.14..2.17 rows=1 width=4) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Index Scan using ixexahkvkey on expenseapprovalhistorykeyvalue kvar (cost=0.14..2.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:COMPLETED-APPROVAL-REQUEST-APPROVAL-AGENT-DESCRIPTION-APPROVER-ROLE'::text)