explain.depesz.com

PostgreSQL's explain analyze made readable

Result: su7A

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

Sort (cost=283,079.76..283,097.94 rows=7,273 width=11,977) (actual rows= loops=)

  • Sort Key: ((pj.info7)::character varying(255)) COLLATE "en_US", pj.startdate, ((userinfo6.displayname)::text) COLLATE "en_US", ((pj.info8)::character varying(255)) COLLATE "en_US", ((pj.info5)::character varying(255)) COLLATE "en_US", ((pj.name)::character varying(255)) COLLATE "en_US", ((pj.code)::character varying(50)) COLLATE "en_US", ((pj.info1)::character varying(255)) COLLATE "en_US", pj.enddate, ((pj.info14)::character varying(255)) COLLATE "en_US", ((pj.info16)::character varying(255)) COLLATE "en_US", ((pj.info15)::character varying(255)) COLLATE "en_US", ((tk.name)::character varying(255)) COLLATE "en_US", ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", timeexpensecostbilling2_facts9.userduplicatename3, ((login.loginname)::character varying(255)) COLLATE "en_US", ((ui.displayname)::text) COLLATE "en_US", timeexpensecostbilling2_facts9.entrydatesheetdate1, ta.timestamputc, timeexpensecostbilling2_facts9.projectstatustype4, ((pj.info2)::character varying(255)) COLLATE "en_US", ((pj.info3)::character varying(255)) COLLATE "en_US", ((pj.info4)::character varying(255)) COLLATE "en_US", ((pj.info6)::character varying(255)) COLLATE "en_US", ((pj.info9)::character varying(255)) COLLATE "en_US", ((pj.info10)::character varying(255)) COLLATE "en_US", ((pj.info12)::character varying(255)) COLLATE "en_US", ((pj.info18)::character varying(255)) COLLATE "en_US", ((pj.info17)::character varying(255)) COLLATE "en_US", ((pj.info19)::character varying(255)) COLLATE "en_US", ((pj.info20)::character varying(255)) COLLATE "en_US", ((tk.code)::character varying(50)) COLLATE "en_US", timeexpensecostbilling2_facts9.taskstatus5, tk.timeentrystartdate, tk.timeentryenddate, ((tk.description)::character varying(255)) COLLATE "en_US
2.          

CTE eexpensecostbilling2_facts0cte

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=264,613.38..264,867.94 rows=7,273 width=61) (actual rows= loops=)

  • Group Key: timeexpensecostbilling2_facts0.entrydatesheetdate, timeexpensecostbilling2_facts0.userid, ui_1.duplicatename, projectstatuslabel2.projectstatustype, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), timeexpensecostbilling2_facts0.projectid, timeexpensecostbilling2_facts0.taskid, timeexpensecostbilling2_facts0.timesheetid
4.          

Initplan (for GroupAggregate)

5. 0.000 0.000 ↓ 0.0

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

6. 0.000 0.000 ↓ 0.0

Sort (cost=264,612.37..264,630.55 rows=7,273 width=61) (actual rows= loops=)

  • Sort Key: timeexpensecostbilling2_facts0.entrydatesheetdate, timeexpensecostbilling2_facts0.userid, ui_1.duplicatename, projectstatuslabel2.projectstatustype, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), timeexpensecostbilling2_facts0.projectid, timeexpensecostbilling2_facts0.taskid, timeexpensecostbilling2_facts0.timesheetid
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,384.21..264,145.87 rows=7,273 width=61) (actual rows= loops=)

  • Hash Cond: (pj_1.projectstatuslabelid = projectstatuslabel2.id)
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6,383.06..264,114.06 rows=7,273 width=73) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,382.77..261,501.24 rows=7,273 width=57) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts0.userid = ui_1.id)
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,347.96..261,447.22 rows=7,273 width=56) (actual rows= loops=)

  • Hash Cond: (tk_1.estimatedcostcurrencyid = exchangerate_1.fixedcurrencyid)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,345.77..261,416.50 rows=7,273 width=60) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts0.taskid = tk_1.id)
12. 0.000 0.000 ↓ 0.0

Subquery Scan on timeexpensecostbilling2_facts0 (cost=5,001.43..259,972.15 rows=7,273 width=52) (actual rows= loops=)

  • Filter: (((timeexpensecostbilling2_facts0.entrydatesheetdate >= '2016-01-01'::date) AND (timeexpensecostbilling2_facts0.entrydatesheetdate <= '2021-12-31'::date)) OR (timeexpensecostbilling2_facts0.entrydatesheetdate IS NULL))
13. 0.000 0.000 ↓ 0.0

Append (cost=5,001.43..249,035.68 rows=729,098 width=1,052) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Result (cost=5,001.43..114,969.88 rows=646,985 width=1,052) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Append (cost=5,001.43..105,265.10 rows=646,985 width=1,044) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=5,001.43..95,705.58 rows=646,984 width=3,527) (actual rows= loops=)

  • Hash Cond: ((at_1.projectid = ptm.projectid) AND (at_1.userid = ptm.userid) AND (at_1.entrydate = ptma.date))
17.          

Initplan (for Hash Left Join)

18. 0.000 0.000 ↓ 0.0

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

19. 0.000 0.000 ↓ 0.0

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

20. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,170.71..54,438.35 rows=646,984 width=2,867) (actual rows= loops=)

  • Hash Cond: (at_1.taskid = tk_2.id)
21. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,499.34..52,068.57 rows=646,984 width=2,863) (actual rows= loops=)

  • Hash Cond: (at_1.billingrateid = br.id)
22. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,498.29..49,232.38 rows=646,984 width=2,729) (actual rows= loops=)

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

Hash Left Join (cost=3,228.00..36,096.80 rows=646,984 width=2,734) (actual rows= loops=)

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

Hash Left Join (cost=2,933.51..23,767.27 rows=646,984 width=2,718) (actual rows= loops=)

  • Hash Cond: (at_1.projectid = pj_2.id)
25. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,406.37..21,540.72 rows=646,984 width=2,714) (actual rows= loops=)

  • Hash Cond: (at_1.timesheetid = ts_2.id)
26. 0.000 0.000 ↓ 0.0

Seq Scan on dm_projecttimeallocation_facts at_1 (cost=0.00..17,406.21 rows=658,301 width=2,702) (actual rows= loops=)

  • Filter: (timeoffcodeid IS NULL)
27. 0.000 0.000 ↓ 0.0

Hash (cost=1,503.94..1,503.94 rows=72,194 width=28) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet ts_2 (cost=0.00..1,503.94 rows=72,194 width=28) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=454.84..454.84 rows=5,784 width=8) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_2 (cost=0.00..454.84 rows=5,784 width=8) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=199.17..199.17 rows=6,355 width=40) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingrate pbr (cost=0.00..199.17 rows=6,355 width=40) (actual rows= loops=)

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

Hash (cost=165.13..165.13 rows=8,413 width=31) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingratehistory pbrh (cost=0.00..165.13 rows=8,413 width=31) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

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

36. 0.000 0.000 ↓ 0.0

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

37. 0.000 0.000 ↓ 0.0

Hash (cost=465.61..465.61 rows=16,461 width=8) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on task tk_2 (cost=0.00..465.61 rows=16,461 width=8) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

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

40. 0.000 0.000 ↓ 0.0

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

41. 0.000 0.000 ↓ 0.0

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

42. 0.000 0.000 ↓ 0.0

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

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

Subquery Scan on *SELECT* 2 (cost=0.71..3,089.69 rows=1 width=1,044) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.71..3,089.68 rows=1 width=1,044) (actual rows= loops=)

  • Filter: (at_2.id IS NULL)
45. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..809.31 rows=1,015 width=44) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

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

  • Filter: (id IS NOT NULL)
47. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = ptma_1.projectteammemberid)
48. 0.000 0.000 ↓ 0.0

Index Scan using ixpta2projectid on dm_projecttimeallocation_facts at_2 (cost=0.42..2.24 rows=1 width=28) (actual rows= loops=)

  • Index Cond: ((ptm_1.projectid = projectid) AND (ptma_1.date = entrydate))
  • Filter: (ptm_1.userid = userid)
49. 0.000 0.000 ↓ 0.0

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

50. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.77..14.44 rows=1 width=4,042) (actual rows= loops=)

51.          

Initplan (for Nested Loop)

52. 0.000 0.000 ↓ 0.0

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

53. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.62..13.15 rows=1 width=154) (actual rows= loops=)

  • Hash Cond: (ex.reimbursementcurrencyid = exchangerate_2.fixedcurrencyid)
  • Join Filter: ((ex.expensedate >= exchangerate_2.effectivedate) AND (ex.expensedate <= exchangerate_2.enddate))
54. 0.000 0.000 ↓ 0.0

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

55. 0.000 0.000 ↓ 0.0

Hash (cost=1.61..1.61 rows=1 width=32) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on exchangerate exchangerate_2 (cost=0.00..1.61 rows=1 width=32) (actual rows= loops=)

  • Filter: (variablecurrencyid = $5)
57. 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.id)
58. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=3,341.01..3,950.65 rows=4,115 width=1,052) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on task tsk (cost=3,341.01..3,888.92 rows=4,115 width=1,044) (actual rows= loops=)

  • Filter: ((NOT (hashed SubPlan 4)) AND (NOT (hashed SubPlan 5)))
60.          

SubPlan (for Seq Scan)

61. 0.000 0.000 ↓ 0.0

Unique (cost=0.42..3,324.58 rows=1,938 width=4) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Index Only Scan using ixpta2taskid on dm_projecttimeallocation_facts at (cost=0.42..3,048.02 rows=110,624 width=4) (actual rows= loops=)

  • Index Cond: (taskid IS NOT NULL)
63. 0.000 0.000 ↓ 0.0

Unique (cost=0.14..11.54 rows=20 width=4) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Index Only Scan using ixeetaskid on expenseentry (cost=0.14..11.49 rows=20 width=4) (actual rows= loops=)

  • Index Cond: (taskid IS NOT NULL)
65. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=18,266.44..130,100.70 rows=77,997 width=1,037) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=18,266.44..128,930.75 rows=77,997 width=1,029) (actual rows= loops=)

67.          

Initplan (for Nested Loop Left Join)

68. 0.000 0.000 ↓ 0.0

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

69. 0.000 0.000 ↓ 0.0

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

70. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=18,263.99..51,491.67 rows=77,029 width=269) (actual rows= loops=)

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

Hash Left Join (cost=18,229.92..51,255.40 rows=77,029 width=253) (actual rows= loops=)

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

Hash Left Join (cost=18,227.76..50,434.94 rows=218,212 width=253) (actual rows= loops=)

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

Hash Left Join (cost=15,821.40..47,455.73 rows=218,212 width=241) (actual rows= loops=)

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

Hash Left Join (cost=15,551.11..42,846.30 rows=218,212 width=253) (actual rows= loops=)

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

Hash Left Join (cost=15,256.61..38,506.56 rows=218,212 width=253) (actual rows= loops=)

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

Hash Join (cost=15,255.57..37,559.67 rows=218,212 width=119) (actual rows= loops=)

  • Hash Cond: (bidm.projectid = pj_3.id)
77. 0.000 0.000 ↓ 0.0

Hash Join (cost=15,062.23..36,793.16 rows=218,212 width=119) (actual rows= loops=)

  • Hash Cond: (bidm.billingitemid = bi.id)
78. 0.000 0.000 ↓ 0.0

Seq Scan on billingitem2denormalizedmetadata bidm (cost=0.00..19,857.57 rows=713,657 width=108) (actual rows= loops=)

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

Hash (cost=12,348.95..12,348.95 rows=217,062 width=27) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on billingitem2 bi (cost=0.00..12,348.95 rows=217,062 width=27) (actual rows= loops=)

  • Filter: isbillable
81. 0.000 0.000 ↓ 0.0

Hash (cost=121.04..121.04 rows=5,784 width=4) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project pj_3 (cost=0.28..121.04 rows=5,784 width=4) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

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

84. 0.000 0.000 ↓ 0.0

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

85. 0.000 0.000 ↓ 0.0

Hash (cost=199.17..199.17 rows=6,355 width=40) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingrate pbr_1 (cost=0.00..199.17 rows=6,355 width=40) (actual rows= loops=)

  • Filter: ((billingrateid = $1) OR ((billingrateid <> $2) AND (userid IS NULL)))
87. 0.000 0.000 ↓ 0.0

Hash (cost=165.13..165.13 rows=8,413 width=24) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on projectbillingratehistory pbrh_1 (cost=0.00..165.13 rows=8,413 width=24) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Hash (cost=1,503.94..1,503.94 rows=72,194 width=28) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet t (cost=0.00..1,503.94 rows=72,194 width=28) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

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

92. 0.000 0.000 ↓ 0.0

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

93. 0.000 0.000 ↓ 0.0

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

94. 0.000 0.000 ↓ 0.0

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

95. 0.000 0.000 ↓ 0.0

Index Scan using ixbimbillingitemidkey on billingitem2metadata bi2m (cost=0.42..0.98 rows=1 width=32) (actual rows= loops=)

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

Hash (cost=1,138.58..1,138.58 rows=16,461 width=12) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=629.75..1,138.58 rows=16,461 width=12) (actual rows= loops=)

  • Hash Cond: (tk_1.id = tdh.taskid)
98. 0.000 0.000 ↓ 0.0

Seq Scan on task tk_1 (cost=0.00..465.61 rows=16,461 width=8) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Hash (cost=432.11..432.11 rows=15,811 width=5) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Seq Scan on taskdenormalizedhierarchy tdh (cost=0.00..432.11 rows=15,811 width=5) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

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

102. 0.000 0.000 ↓ 0.0

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

  • Index Cond: ((variablecurrencyid = $0) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
103. 0.000 0.000 ↓ 0.0

Hash (cost=26.03..26.03 rows=703 width=5) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui_1 (cost=0.00..26.03 rows=703 width=5) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_1 (cost=0.28..0.36 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (timeexpensecostbilling2_facts0.projectid = id)
106. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=7 width=20) (actual rows= loops=)

107. 0.000 0.000 ↓ 0.0

Seq Scan on projectstatuslabel projectstatuslabel2 (cost=0.00..1.07 rows=7 width=20) (actual rows= loops=)

108.          

Initplan (for Sort)

109. 0.000 0.000 ↓ 0.0

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

110. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,040.54..17,744.31 rows=7,273 width=11,977) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=2,039.28..7,629.95 rows=7,273 width=604) (actual rows= loops=)

  • Merge Cond: (ts.id = timeexpensecostbilling2_facts9.timesheetid8)
112. 0.000 0.000 ↓ 0.0

Merge Join (cost=0.83..5,301.93 rows=72,194 width=16) (actual rows= loops=)

  • Merge Cond: (ts.id = tslist.timesheetid)
113. 0.000 0.000 ↓ 0.0

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

114. 0.000 0.000 ↓ 0.0

Index Only Scan using ixdtslsftimesheetid on dm_timesheetlist_facts tslist (cost=0.42..2,847.21 rows=75,186 width=16) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

Sort (cost=2,038.45..2,056.63 rows=7,273 width=604) (actual rows= loops=)

  • Sort Key: timeexpensecostbilling2_facts9.timesheetid8
116. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,302.15..1,571.95 rows=7,273 width=604) (actual rows= loops=)

  • Hash Cond: (ui.id = login.userid)
117. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,270.33..1,520.93 rows=7,273 width=591) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts9.userid2 = ui.id)
118. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,235.52..1,466.91 rows=7,273 width=559) (actual rows= loops=)

  • Hash Cond: (tk.estimatedcostcurrencyid = exchangerate.fixedcurrencyid)
119. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,233.33..1,436.19 rows=7,273 width=563) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts9.taskid7 = tk.id)
120. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=561.96..745.72 rows=7,273 width=477) (actual rows= loops=)

  • Hash Cond: (pj.projectleaderapproverid = userinfo6.id)
121. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=527.14..691.70 rows=7,273 width=466) (actual rows= loops=)

  • Hash Cond: (timeexpensecostbilling2_facts9.projectid6 = pj.id)
122. 0.000 0.000 ↓ 0.0

CTE Scan on eexpensecostbilling2_facts0cte timeexpensecostbilling2_facts9 (cost=0.00..145.46 rows=7,273 width=61) (actual rows= loops=)

123. 0.000 0.000 ↓ 0.0

Hash (cost=454.84..454.84 rows=5,784 width=409) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Seq Scan on project pj (cost=0.00..454.84 rows=5,784 width=409) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Hash (cost=26.03..26.03 rows=703 width=19) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo6 (cost=0.00..26.03 rows=703 width=19) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Hash (cost=465.61..465.61 rows=16,461 width=90) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Seq Scan on task tk (cost=0.00..465.61 rows=16,461 width=90) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

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

130. 0.000 0.000 ↓ 0.0

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

  • Index Cond: ((variablecurrencyid = $17) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
131. 0.000 0.000 ↓ 0.0

Hash (cost=26.03..26.03 rows=703 width=32) (actual rows= loops=)

132. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui (cost=0.00..26.03 rows=703 width=32) (actual rows= loops=)

133. 0.000 0.000 ↓ 0.0

Hash (cost=23.03..23.03 rows=703 width=17) (actual rows= loops=)

134. 0.000 0.000 ↓ 0.0

Seq Scan on login (cost=0.00..23.03 rows=703 width=17) (actual rows= loops=)

135. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.25..1.38 rows=1 width=24) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..0.93 rows=1 width=24) (actual rows= loops=)

137. 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: (ts.id = timesheetid)
138. 0.000 0.000 ↓ 0.0

Index Scan using uixtahsn on timesheetapprovalhistory ta (cost=0.42..0.48 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (serialnumber = tahls.lastsubmitserialnumber)
139. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (id = tahls.timesheetid)
  • Filter: (approvalstatus = ANY ('{1,2}'::integer[]))