explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tAJ7

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

Sort (cost=1,809,424,728.66..1,809,502,508.91 rows=31,112,100 width=13,001) (actual rows= loops=)

  • Sort Key: ((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", "*SELECT* 1".entrydate, ((ui.email)::character varying(255)) COLLATE "en_US", (CASE WHEN ui.disabled THEN 0 ELSE 1 END), ui.startdate, ui.enddate, ((userinfo5.displayname)::text) COLLATE "en_US", ((userinfo5.email)::character varying(255)) COLLATE "en_US", ((dep.name)::character varying(255)) COLLATE "en_US", ((dep.code)::character varying(50)) COLLATE "en_US", ((array_to_string((SubPlan 1), ' / '::text))::text) COLLATE "en_US", ((act.name)::character varying(50)) COLLATE "en_US", ((act.code)::character varying(50)) COLLATE "en_US", ((ui.externalid)::character varying(255)) COLLATE "en_US", ((employeetype9.name)::character varying(50)) COLLATE "en_US", touc.workweekstartday, ts.startdate, ts.enddate, ((date_part('year'::text, (ts.startdate)::timestamp without time zone))::integer), ((date_part('quarter'::text, (ts.startdate)::timestamp without time zone))::integer), ((date_part('month'::text, (ts.startdate)::timestamp without time zone))::integer), ((date_part('week'::text, (ts.startdate)::timestamp without time zone))::integer), ((date_part('year'::text, (ts.enddate)::timestamp without time zone))::integer), ((date_part('quarter'::text, (ts.enddate)::timestamp without time zone))::integer), ((date_part('month'::text, (ts.enddate)::timestamp without time zone))::integer), ((date_part('week'::text, (ts.enddate)::timestamp without time zone))::integer), ta.timestamputc, ((date_part('year'::text, ta.timestamputc))::integer), ((date_part('quarter'::text, ta.timestamputc))::integer), ((date_part('month'::text, ta.timestamputc))::integer), ((date_part('week'::text, ta.timestamputc))::integer), tslist.timesheetstatus, tah.timestamputc, ((tah.approvalcomments)::text) COLLATE "en_US", ta_1.attestationstatus, tar.fromtimestamputc, ((tk.name)::character varying(255)) COLLATE "en_US", ((tdh_1.hierarchysorting)::text) COLLATE "en_US", ((tdh_1.hierarchytaskname)::text) COLLATE "en_US", ((tk.code)::character varying(50)) COLLATE "en_US", (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), tk.timeentrystartdate, tk.timeentryenddate, tk.timeandexpenseentrytype, (COALESCE(tk.costtype, (SubPlan 2))), ((tk.description)::character varying(255)) COLLATE "en_US", ((SubPlan 3)), ((SubPlan 4)), ((program.name)::character varying(255)) COLLATE "en_US", ((userinfo30.displayname)::text) COLLATE "en_US", program.startdate, program.enddate, (CASE WHEN program.archived THEN 1 ELSE 0 END), ((pj_3.name)::character varying(255)) COLLATE "en_US", ((pj_3.code)::character varying(50)) COLLATE "en_US", projectstatuslabel32.projectstatustype, pj_3.billingtype, pj_3.timeandexpenseentrytype, pj_3.clientbillingallocationmethod, pj_3.costtype, ((userinfo33.displayname)::text) COLLATE "en_US", ((userinfo33.email)::character varying(255)) COLLATE "en_US", pj_3.startdate, pj_3.enddate, ((pj_3.description)::character varying(255)) COLLATE "en_US", ((SubPlan 5)), ((SubPlan 6)), ((pj_3.info1)::character varying(255)) COLLATE "en_US", ((pj_3.info2)::character varying(255)) COLLATE "en_US", ((pj_3.info3)::character varying(255)) COLLATE "en_US", ((cl.name)::character varying(255)) COLLATE "en_US", ((cl.code)::character varying(50)) COLLATE "en_US", (CASE WHEN cl.disabled THEN 0 ELSE 1 END), ((userinfo41.displayname)::text) COLLATE "en_US", ((activities42.name)::character varying(50)) COLLATE "en_US", ((activities42.code)::character varying(50)) COLLATE "en_US", ((activities42.description)::character varying(255)) COLLATE "en_US", ((date_part('year'::text, ("*SELECT* 1".entrydate)::timestamp without time zone))::integer), ((date_part('quarter'::text, ("*SELECT* 1".entrydate)::timestamp without time zone))::integer), ((date_part('month'::text, ("*SELECT* 1".entrydate)::timestamp without time zone))::integer), ((date_part('week'::text, ("*SELECT* 1".entrydate)::timestamp without time zone))::integer), ui.id, (("*SELECT* 1".comments)::text) COLLATE "en_US", ((br.name)::character varying(50)) COLLATE "en_US", ((currencyinfo3.symbol)::character varying(50)) COLLATE "en_US", pbrh.hourlyrate, pbrh.effectivedate, uprrh.effectivedate, ((currencyinfo52.symbol)::character varying(50)) COLLATE "en_US", uprrh.hourlyrate
2.          

Initplan (for Sort)

3. 0.000 0.000 ↓ 0.0

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

4. 0.000 0.000 ↓ 0.0

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

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

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

7. 0.000 0.000 ↓ 0.0

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

8. 0.000 0.000 ↓ 0.0

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

9. 0.000 0.000 ↓ 0.0

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

10. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=461,321.18..1,607,577,625.47 rows=31,112,100 width=13,001) (actual rows= loops=)

  • Merge Cond: ("*SELECT* 1".timesheetid = t.id)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=231,633.07..414,215.71 rows=4,600 width=6,390) (actual rows= loops=)

  • Join Filter: (uprrh.currencyid = currencyinfo52.id)
12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=231,633.07..413,783.36 rows=4,600 width=6,276) (actual rows= loops=)

  • Join Filter: (((("*SELECT* 1".clientid IS NULL) AND (CASE WHEN (pj_11.clientbillingallocationmethod = 0) THEN pc_6.clientid ELSE at_2.userspecifiedclientid END IS NULL)) OR (CASE WHEN (pj_11.clientbillingallocationmethod = 0) THEN pc_6.clientid ELSE at_2.userspecifiedclientid END = "*SELECT* 1".clientid)) AND ((("*SELECT* 1".effectivedate IS NULL) AND (CASE WHEN (pj_11.clientbillingallocationmethod = 0) THEN pc_6.effectivedate ELSE pc_7.effectivedate END IS NULL)) OR (CASE WHEN (pj_11.clientbillingallocationmethod = 0) THEN pc_6.effectivedate ELSE pc_7.effectivedate END = "*SELECT* 1".effectivedate)))
13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=231,631.65..405,295.46 rows=4,600 width=6,205) (actual rows= loops=)

  • Join Filter: (((("*SELECT* 1".clientid IS NULL) AND (CASE WHEN (pj_8.clientbillingallocationmethod = 0) THEN pc_4.clientid ELSE at_1.userspecifiedclientid END IS NULL)) OR (CASE WHEN (pj_8.clientbillingallocationmethod = 0) THEN pc_4.clientid ELSE at_1.userspecifiedclientid END = "*SELECT* 1".clientid)) AND ((("*SELECT* 1".effectivedate IS NULL) AND (CASE WHEN (pj_8.clientbillingallocationmethod = 0) THEN pc_4.effectivedate ELSE pc_5.effectivedate END IS NULL)) OR (CASE WHEN (pj_8.clientbillingallocationmethod = 0) THEN pc_4.effectivedate ELSE pc_5.effectivedate END = "*SELECT* 1".effectivedate)))
14. 0.000 0.000 ↓ 0.0

Merge Join (cost=231,630.38..397,854.39 rows=4,600 width=6,173) (actual rows= loops=)

  • Merge Cond: (ts.id = ts_3.id)
15. 0.000 0.000 ↓ 0.0

Sort (cost=231,629.81..231,641.31 rows=4,600 width=6,109) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".timesheetid
16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,172.01..231,349.96 rows=4,600 width=6,109) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".activityid = activities42.id)
17. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,170.76..231,336.38 rows=4,600 width=5,361) (actual rows= loops=)

  • Hash Cond: (pj_3.totalestimatedcontractcurrencyid = currencyinfo39.id)
18. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,169.61..231,315.84 rows=4,600 width=5,243) (actual rows= loops=)

  • Hash Cond: (pj_6.estimatedexpensescurrencyid = currencyinfo37.id)
19. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,168.45..231,302.60 rows=4,600 width=5,125) (actual rows= loops=)

  • Hash Cond: (pj_6.estimatedcostcurrencyid = currencyinfo36.id)
20. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,167.29..231,289.37 rows=4,600 width=5,007) (actual rows= loops=)

  • Hash Cond: (dmv_projectclients35.projectid = pj_6.id)
21. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,152.15..231,261.88 rows=4,600 width=4,943) (actual rows= loops=)

  • Hash Cond: (dmv_projectclients35.projectid = pj_4.id)
  • Join Filter: ((((dmv_projectclients35.clientid IS NULL) AND (pc_3.clientid IS NULL)) OR (pc_3.clientid = dmv_projectclients35.clientid)) AND (((dmv_projectclients35.effectivedate IS NULL) AND (pc_3.effectivedate IS NULL)) OR (pc_3.effectivedate = dmv_projectclients35.effectivedate)))
22. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,099.18..231,123.03 rows=4,600 width=4,855) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".clientid = cl.id)
23. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,063.67..231,062.68 rows=4,600 width=4,696) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".projectid = dmv_projectclients35.projectid)
  • Join Filter: (((("*SELECT* 1".clientid IS NULL) AND (dmv_projectclients35.clientid IS NULL)) OR (dmv_projectclients35.clientid = "*SELECT* 1".clientid)) AND ((("*SELECT* 1".effectivedate IS NULL) AND (dmv_projectclients35.effectivedate IS NULL)) OR (dmv_projectclients35.effectivedate = "*SELECT* 1".effectivedate)))
24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,495.33..229,413.27 rows=4,600 width=4,688) (actual rows= loops=)

  • Hash Cond: (pj_3.projectleaderapproverid = userinfo33.id)
25. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,484.16..229,389.80 rows=4,600 width=4,647) (actual rows= loops=)

  • Hash Cond: (pj_3.projectstatuslabelid = projectstatuslabel32.id)
26. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,483.00..229,369.25 rows=4,600 width=4,659) (actual rows= loops=)

  • Hash Cond: (program.programmanagerid = userinfo30.id)
27. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,471.82..229,345.78 rows=4,600 width=4,645) (actual rows= loops=)

  • Hash Cond: (pj_3.programid = program.id)
28. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,460.25..229,322.13 rows=4,600 width=4,113) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".projectid = pj_3.id)
29. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,075.41..228,924.97 rows=4,600 width=3,259) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".taskid = tk_1.id)
  • Join Filter: (((("*SELECT* 1".clientid IS NULL) AND (pc_2.clientid IS NULL)) OR (pc_2.clientid = "*SELECT* 1".clientid)) AND ((("*SELECT* 1".effectivedate IS NULL) AND (pc_2.effectivedate IS NULL)) OR (pc_2.effectivedate = "*SELECT* 1".effectivedate)))
30. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=10,033.01..228,861.52 rows=4,600 width=3,010) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".taskid = tk.id)
31. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,969.55..228,778.27 rows=4,600 width=2,310) (actual rows= loops=)

  • Hash Cond: (tsar.userid = login22.userid)
32. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,958.35..228,754.78 rows=4,600 width=2,293) (actual rows= loops=)

  • Hash Cond: (tsar.userid = userinfo21.id)
33. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,947.17..228,731.31 rows=4,600 width=2,258) (actual rows= loops=)

  • Hash Cond: (ts.id = ta_1.timesheetid)
34. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,888.48..228,655.25 rows=4,600 width=2,124) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9,888.06..220,144.09 rows=4,430 width=2,067) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,887.64..211,632.93 rows=4,430 width=1,994) (actual rows= loops=)

  • Hash Cond: (ts.id = tahls.timesheetid)
37. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=8,267.58..209,959.14 rows=4,430 width=1,986) (actual rows= loops=)

  • Hash Cond: (ts.id = tah.timesheetid)
38. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=7,012.23..208,606.41 rows=4,430 width=1,926) (actual rows= loops=)

  • Hash Cond: (ts.id = tan.timesheetid)
39. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,960.04..208,535.12 rows=4,430 width=1,921) (actual rows= loops=)

  • Join Filter: (ts.id = tslist.timesheetid)
40. 0.000 0.000 ↓ 0.0

Nested Loop (cost=6,959.76..207,140.59 rows=4,431 width=1,901) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,959.48..205,809.38 rows=4,431 width=1,877) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".userid = uprh.userid)
42. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,945.00..204,831.64 rows=245,438 width=1,610) (actual rows= loops=)

  • Hash Cond: (ui.employeetypeid = employeetype9.id)
43. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,943.84..203,796.13 rows=245,438 width=1,496) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".userid = du.userid)
44. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,912.32..200,145.74 rows=306,161 width=606) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".userid = ui.id)
45. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,868.52..195,897.19 rows=304,836 width=449) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".timeallocationid = at.id)
  • Join Filter: (((("*SELECT* 1".clientid IS NULL) AND (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END IS NULL)) OR (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END = "*SELECT* 1".clientid)) AND ((("*SELECT* 1".effectivedate IS NULL) AND (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.effectivedate ELSE pc_1.effectivedate END IS NULL)) OR (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.effectivedate ELSE pc_1.effectivedate END = "*SELECT* 1".effectivedate)))
46. 0.000 0.000 ↓ 0.0

Append (cost=38.36..185,806.97 rows=304,836 width=210) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=38.36..184,219.92 rows=300,150 width=210) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=38.36..181,218.42 rows=300,150 width=5,398) (actual rows= loops=)

  • Hash Cond: (pta.projectid = pj_13.id)
  • Join Filter: ((pta.entrydate >= pc_8.effectivedate) AND (pta.entrydate <= pc_8.enddate))
49. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15.78..13,587.02 rows=300,150 width=123) (actual rows= loops=)

  • Hash Cond: ((pta.projectid = pj_14.id) AND (pta.userspecifiedclientid = pc_9.clientid))
  • Join Filter: ((pta.entrydate >= pc_9.effectivedate) AND (pta.entrydate <= pc_9.enddate))
50. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..11,320.39 rows=300,150 width=119) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet dmvts_1 (cost=0.00..172.15 rows=7,915 width=32) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Index Scan using ixpta2userid on dm_projecttimeallocation_facts pta (cost=0.29..1.12 rows=29 width=99) (actual rows= loops=)

  • Index Cond: ((userid = dmvts_1.userid) AND (entrydate >= dmvts_1.startdate) AND (entrydate <= dmvts_1.enddate))
  • Filter: (breaktypeid IS NULL)
53. 0.000 0.000 ↓ 0.0

Hash (cost=15.47..15.47 rows=1 width=16) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.14..15.47 rows=1 width=16) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_14 (cost=0.00..13.30 rows=1 width=4) (actual rows= loops=)

  • Filter: (clientbillingallocationmethod = 1)
56. 0.000 0.000 ↓ 0.0

Index Only Scan using uix4pc_projectclienteffectiveend on projectclient pc_9 (cost=0.14..2.16 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (projectid = pj_14.id)
57. 0.000 0.000 ↓ 0.0

Hash (cost=20.33..20.33 rows=180 width=52) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash Join (cost=15.60..20.33 rows=180 width=52) (actual rows= loops=)

  • Hash Cond: (pc_8.projectid = pj_13.id)
59. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient pc_8 (cost=0.00..4.25 rows=180 width=48) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Hash (cost=13.30..13.30 rows=184 width=8) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_13 (cost=0.00..13.30 rows=184 width=8) (actual rows= loops=)

  • Filter: (clientbillingallocationmethod = 0)
62. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.57..1,587.05 rows=4,686 width=204) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..1,540.19 rows=4,686 width=5,392) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=0.29..833.67 rows=1,178 width=8) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetdatecustomdata tdcd (cost=0.00..25.70 rows=1,570 width=8) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Index Only Scan using ixpta2userid on dm_projecttimeallocation_facts facts (cost=0.29..0.54 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((userid = tdcd.userid) AND (entrydate = tdcd.entrydate))
67. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet ts_2 (cost=0.28..0.56 rows=4 width=28) (actual rows= loops=)

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

Hash (cost=6,629.08..6,629.08 rows=16,087 width=275) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,097.36..6,629.08 rows=16,087 width=275) (actual rows= loops=)

  • Hash Cond: (pbrh.currencyid = currencyinfo3.id)
70. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,096.20..6,560.12 rows=16,087 width=161) (actual rows= loops=)

  • Hash Cond: ((at.projectid = pj_1.id) AND (at.userspecifiedclientid = pc_1.clientid))
  • Join Filter: ((at.entrydate >= pc_1.effectivedate) AND (at.entrydate <= pc_1.enddate))
71. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,080.71..6,423.97 rows=16,087 width=165) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,080.43..4,101.91 rows=3,104 width=153) (actual rows= loops=)

  • Hash Cond: (at.projectid = pj.id)
  • Join Filter: ((at.entrydate >= pc.effectivedate) AND (at.entrydate <= pc.enddate))
73. 0.000 0.000 ↓ 0.0

Merge Join (cost=1,057.84..3,960.08 rows=3,104 width=89) (actual rows= loops=)

  • Merge Cond: (at.billingrateid = br.id)
74. 0.000 0.000 ↓ 0.0

Merge Join (cost=1,057.64..4,639.04 rows=4,234 width=91) (actual rows= loops=)

  • Merge Cond: ((at.billingrateid = pbr.billingrateid) AND (at.projectid = pbr.projectid))
  • Join Filter: ((at.entrydate >= pbrh.effectivedate) AND (at.entrydate <= pbrh.enddate) AND (((pbr.billingrateid = $22) AND (at.userid = pbr.userid)) OR ((pbr.billingrateid <> $23) AND (pbr.userid IS NULL))))
75. 0.000 0.000 ↓ 0.0

Index Scan using ixpta4billingrateid on dm_projecttimeallocation_facts at (cost=0.41..2,759.11 rows=57,913 width=64) (actual rows= loops=)

  • Filter: (breaktypeid IS NULL)
76. 0.000 0.000 ↓ 0.0

Sort (cost=1,056.94..1,079.17 rows=8,893 width=39) (actual rows= loops=)

  • Sort Key: pbr.billingrateid, pbr.projectid
77. 0.000 0.000 ↓ 0.0

Hash Join (cost=276.34..473.63 rows=8,893 width=39) (actual rows= loops=)

  • Hash Cond: (pbrh.projectbillingrateid = pbr.id)
78. 0.000 0.000 ↓ 0.0

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

79. 0.000 0.000 ↓ 0.0

Hash (cost=165.04..165.04 rows=8,904 width=40) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

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

81. 0.000 0.000 ↓ 0.0

Index Scan using billingrate_pkey on billingrate br (cost=0.14..6.88 rows=116 width=46) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Hash (cost=20.33..20.33 rows=180 width=52) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Hash Join (cost=15.60..20.33 rows=180 width=52) (actual rows= loops=)

  • Hash Cond: (pc.projectid = pj.id)
84. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient pc (cost=0.00..4.25 rows=180 width=48) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Hash (cost=13.30..13.30 rows=184 width=8) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Seq Scan on project pj (cost=0.00..13.30 rows=184 width=8) (actual rows= loops=)

  • Filter: (clientbillingallocationmethod = 0)
87. 0.000 0.000 ↓ 0.0

Index Scan using ixtsuseridstartdateenddate on timesheet dmvts (cost=0.28..0.47 rows=4 width=16) (actual rows= loops=)

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

Hash (cost=15.47..15.47 rows=1 width=16) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.14..15.47 rows=1 width=16) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_1 (cost=0.00..13.30 rows=1 width=4) (actual rows= loops=)

  • Filter: (clientbillingallocationmethod = 1)
91. 0.000 0.000 ↓ 0.0

Index Only Scan using uix4pc_projectclienteffectiveend on projectclient pc_1 (cost=0.14..2.16 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (projectid = pj_1.id)
92. 0.000 0.000 ↓ 0.0

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

93. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo3 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Hash (cost=40.91..40.91 rows=231 width=157) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Hash Join (cost=33.55..40.91 rows=231 width=157) (actual rows= loops=)

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

Hash Right Join (cost=22.35..29.10 rows=230 width=136) (actual rows= loops=)

  • Hash Cond: (userhierarchy55.userid = ui.id)
97. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.18..17.32 rows=226 width=49) (actual rows= loops=)

  • Hash Cond: (userhierarchy55.supervisorid = userinfo5.id)
98. 0.000 0.000 ↓ 0.0

Seq Scan on userhierarchy userhierarchy55 (cost=0.00..5.54 rows=226 width=8) (actual rows= loops=)

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

Hash (cost=8.30..8.30 rows=230 width=49) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo5 (cost=0.00..8.30 rows=230 width=49) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=230 width=91) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui (cost=0.00..8.30 rows=230 width=91) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Hash (cost=8.31..8.31 rows=231 width=21) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Seq Scan on login (cost=0.00..8.31 rows=231 width=21) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Hash (cost=29.22..29.22 rows=184 width=890) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=20.74..29.22 rows=184 width=890) (actual rows= loops=)

  • Hash Cond: (ui_1.defaultactivityid = act.id)
107. 0.000 0.000 ↓ 0.0

Hash Join (cost=19.50..27.49 rows=184 width=658) (actual rows= loops=)

  • Hash Cond: (du.departmentid = departments.id)
108. 0.000 0.000 ↓ 0.0

Hash Join (cost=18.43..25.26 rows=184 width=662) (actual rows= loops=)

  • Hash Cond: (du.userid = ui_1.id)
109. 0.000 0.000 ↓ 0.0

Hash Join (cost=7.25..13.59 rows=186 width=654) (actual rows= loops=)

  • Hash Cond: (du.userid = touc.userid)
110. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.07..6.79 rows=228 width=646) (actual rows= loops=)

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

Seq Scan on departmentusers du (cost=0.00..4.28 rows=228 width=8) (actual rows= loops=)

112. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=638) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Seq Scan on departments dep (cost=0.00..1.03 rows=3 width=638) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Hash (cost=3.86..3.86 rows=186 width=8) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

Seq Scan on timeoffuserconfig touc (cost=0.00..3.86 rows=186 width=8) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=230 width=8) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo ui_1 (cost=0.00..8.30 rows=230 width=8) (actual rows= loops=)

118. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=4) (actual rows= loops=)

119. 0.000 0.000 ↓ 0.0

Seq Scan on departments (cost=0.00..1.03 rows=3 width=4) (actual rows= loops=)

120. 0.000 0.000 ↓ 0.0

Hash (cost=1.11..1.11 rows=11 width=240) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Seq Scan on activities act (cost=0.00..1.11 rows=11 width=240) (actual rows= loops=)

122. 0.000 0.000 ↓ 0.0

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

123. 0.000 0.000 ↓ 0.0

Seq Scan on employeetype employeetype9 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Hash (cost=14.43..14.43 rows=4 width=295) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.61..14.43 rows=4 width=295) (actual rows= loops=)

126. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.46..13.63 rows=4 width=291) (actual rows= loops=)

127. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.33..13.00 rows=4 width=181) (actual rows= loops=)

128. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.19..11.96 rows=5 width=153) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo13 (cost=0.00..1.09 rows=1 width=118) (actual rows= loops=)

  • Filter: ($25 = id)
130. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.19..10.82 rows=5 width=35) (actual rows= loops=)

  • Hash Cond: (uprh.currencyid = exchangerate.fixedcurrencyid)
131. 0.000 0.000 ↓ 0.0

Seq Scan on userpayrollratehistory uprh (cost=0.00..7.73 rows=229 width=11) (actual rows= loops=)

  • Filter: ((('now'::cstring)::date >= effectivedate) AND (('now'::cstring)::date <= enddate))
132. 0.000 0.000 ↓ 0.0

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

133. 0.000 0.000 ↓ 0.0

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

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

Index Scan using ixusauserid on userscheduleassignment usa (cost=0.14..0.20 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (userid = uprh.userid)
  • Filter: ((date_trunc('day'::text, now()) >= effectivedate) AND (date_trunc('day'::text, now()) <= enddate))
135. 0.000 0.000 ↓ 0.0

Index Scan using currencyinfo_pkey on currencyinfo currencyinfo11 (cost=0.13..0.16 rows=1 width=122) (actual rows= loops=)

  • Index Cond: (id = uprh.currencyid)
136. 0.000 0.000 ↓ 0.0

Index Only Scan using userinfo_pkey on userinfo ui_2 (cost=0.14..0.20 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = uprh.userid)
137. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts (cost=0.28..0.30 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = "*SELECT* 1".timesheetid)
138. 0.000 0.000 ↓ 0.0

Index Scan using ixdtslsftimesheetid on dm_timesheetlist_facts tslist (cost=0.28..0.30 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (timesheetid = "*SELECT* 1".timesheetid)
139. 0.000 0.000 ↓ 0.0

Hash (cost=46.63..46.63 rows=445 width=21) (actual rows= loops=)

140. 0.000 0.000 ↓ 0.0

Hash Join (cost=33.89..46.63 rows=445 width=21) (actual rows= loops=)

  • Hash Cond: (tsar.nodeid = tan.id)
141. 0.000 0.000 ↓ 0.0

Seq Scan on tsapprovalrequest tsar (cost=0.00..11.56 rows=445 width=20) (actual rows= loops=)

  • Filter: ((systemprocessidentifier IS NULL) OR (systemprocessidentifier <> 'urn:replicon:approval-system-process:timesheet-submit-script-data-and-validation'::text))
142. 0.000 0.000 ↓ 0.0

Hash (cost=22.84..22.84 rows=884 width=32) (actual rows= loops=)

143. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalnodes tan (cost=0.00..22.84 rows=884 width=32) (actual rows= loops=)

144. 0.000 0.000 ↓ 0.0

Hash (cost=1,198.65..1,198.65 rows=4,536 width=76) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=209.34..1,198.65 rows=4,536 width=76) (actual rows= loops=)

  • Hash Cond: (tah.timesheetid = tahls_1.timesheetid)
  • Filter: ((tahls_1.timesheetid IS NULL) OR (tah.serialnumber > tahls_1.lastsubmitserialnumber))
146. 0.000 0.000 ↓ 0.0

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.29..953.85 rows=13,607 width=80) (actual rows= loops=)

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

Hash (cost=119.58..119.58 rows=7,158 width=20) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalhistorylastsubmit tahls_1 (cost=0.00..119.58 rows=7,158 width=20) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Hash (cost=1,537.16..1,537.16 rows=6,632 width=24) (actual rows= loops=)

150. 0.000 0.000 ↓ 0.0

Hash Join (cost=492.66..1,537.16 rows=6,632 width=24) (actual rows= loops=)

  • Hash Cond: (tahls.timesheetid = ts_1.id)
151. 0.000 0.000 ↓ 0.0

Hash Join (cost=209.06..1,234.76 rows=7,158 width=24) (actual rows= loops=)

  • Hash Cond: (ta.serialnumber = tahls.lastsubmitserialnumber)
152. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalhistory ta (cost=0.00..840.36 rows=30,336 width=12) (actual rows= loops=)

153. 0.000 0.000 ↓ 0.0

Hash (cost=119.58..119.58 rows=7,158 width=20) (actual rows= loops=)

154. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetapprovalhistorylastsubmit tahls (cost=0.00..119.58 rows=7,158 width=20) (actual rows= loops=)

155. 0.000 0.000 ↓ 0.0

Hash (cost=191.94..191.94 rows=7,333 width=16) (actual rows= loops=)

156. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet ts_1 (cost=0.00..191.94 rows=7,333 width=16) (actual rows= loops=)

  • Filter: (approvalstatus = ANY ('{1,2}'::integer[]))
157. 0.000 0.000 ↓ 0.0

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue18 (cost=0.42..1.91 rows=1 width=89) (actual rows= loops=)

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

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue19 (cost=0.42..1.91 rows=1 width=89) (actual rows= loops=)

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

Hash (cost=58.45..58.45 rows=19 width=150) (actual rows= loops=)

160. 0.000 0.000 ↓ 0.0

Hash Join (cost=30.80..58.45 rows=19 width=150) (actual rows= loops=)

  • Hash Cond: (ta_1.id = tar.timesheetattestationid)
161. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetattestation ta_1 (cost=0.00..22.70 rows=1,270 width=36) (actual rows= loops=)

162. 0.000 0.000 ↓ 0.0

Hash (cost=30.76..30.76 rows=3 width=146) (actual rows= loops=)

163. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.09..30.76 rows=3 width=146) (actual rows= loops=)

164. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.55..23.03 rows=3 width=101) (actual rows= loops=)

165. 0.000 0.000 ↓ 0.0

Seq Scan on timesheetattestationrevision tar (cost=0.00..15.30 rows=3 width=40) (actual rows= loops=)

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

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue effectiveuser (cost=0.55..2.57 rows=1 width=77) (actual rows= loops=)

  • Index Cond: ((revisionauditid = tar.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:EFFECTIVE-USER'::text))
167. 0.000 0.000 ↓ 0.0

Index Scan using uix4rakv_uniquekeyuri on revisionauditkeyvalue actualuser (cost=0.55..2.57 rows=1 width=77) (actual rows= loops=)

  • Index Cond: ((revisionauditid = tar.openingauditid) AND (upper(keyuri) = 'URN:REPLICON:REVISION-AUDIT-KEY:ACTUAL-USER'::text))
168. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=230 width=39) (actual rows= loops=)

169. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo21 (cost=0.00..8.30 rows=230 width=39) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Hash (cost=8.31..8.31 rows=231 width=21) (actual rows= loops=)

171. 0.000 0.000 ↓ 0.0

Seq Scan on login login22 (cost=0.00..8.31 rows=231 width=21) (actual rows= loops=)

172. 0.000 0.000 ↓ 0.0

Hash (cost=63.33..63.33 rows=11 width=700) (actual rows= loops=)

173. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4.64..63.33 rows=11 width=700) (actual rows= loops=)

  • Hash Cond: (tk.id = tdh_1.taskid)
174. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2.39..61.04 rows=11 width=677) (actual rows= loops=)

  • Hash Cond: (tk.id = tdh.taskid)
175. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.14..58.75 rows=11 width=673) (actual rows= loops=)

  • Join Filter: (tk.estimatedcostcurrencyid = exchangerate_1.fixedcurrencyid)
176. 0.000 0.000 ↓ 0.0

Seq Scan on task tk (cost=0.00..56.41 rows=11 width=677) (actual rows= loops=)

177.          

SubPlan (for Seq Scan)

178. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_15 (cost=0.14..2.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = tk.projectid)
179. 0.000 0.000 ↓ 0.0

Limit (cost=0.41..1.43 rows=1 width=4) (actual rows= loops=)

180. 0.000 0.000 ↓ 0.0

Index Only Scan using ixpta2taskid on dm_projecttimeallocation_facts (cost=0.41..1.43 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (taskid = tk.id)
181. 0.000 0.000 ↓ 0.0

Limit (cost=0.41..1.43 rows=1 width=4) (actual rows= loops=)

182. 0.000 0.000 ↓ 0.0

Index Only Scan Backward using ixpta2taskid on dm_projecttimeallocation_facts dm_projecttimeallocation_facts_1 (cost=0.41..1.43 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (taskid = tk.id)
183. 0.000 0.000 ↓ 0.0

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

184. 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 = $26) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
185. 0.000 0.000 ↓ 0.0

Hash (cost=2.11..2.11 rows=11 width=5) (actual rows= loops=)

186. 0.000 0.000 ↓ 0.0

Seq Scan on taskdenormalizedhierarchy tdh (cost=0.00..2.11 rows=11 width=5) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

Hash (cost=2.11..2.11 rows=11 width=27) (actual rows= loops=)

188. 0.000 0.000 ↓ 0.0

Seq Scan on taskdenormalizedhierarchy tdh_1 (cost=0.00..2.11 rows=11 width=27) (actual rows= loops=)

189. 0.000 0.000 ↓ 0.0

Hash (cost=42.26..42.26 rows=11 width=253) (actual rows= loops=)

190. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=38.49..42.26 rows=11 width=253) (actual rows= loops=)

  • Hash Cond: (tk_1.id = tk_2.id)
191. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=33.80..37.42 rows=11 width=92) (actual rows= loops=)

  • Join Filter: (tk_1.estimatedcostcurrencyid = exchangerate_2.fixedcurrencyid)
192. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=33.65..35.00 rows=11 width=99) (actual rows= loops=)

  • Hash Cond: (tk_1.projectid = pj_2.id)
193. 0.000 0.000 ↓ 0.0

Seq Scan on task tk_1 (cost=0.00..1.11 rows=11 width=31) (actual rows= loops=)

194. 0.000 0.000 ↓ 0.0

Hash (cost=31.35..31.35 rows=184 width=44) (actual rows= loops=)

195. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=25.21..31.35 rows=184 width=44) (actual rows= loops=)

  • Hash Cond: (pc_2.projectid = pj_2.id)
196. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.00..15.75 rows=180 width=21) (actual rows= loops=)

  • Hash Cond: ((pc_2.projectid = projectclient.projectid) AND (pc_2.effectivedate = (max(projectclient.effectivedate))))
197. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient pc_2 (cost=0.00..3.80 rows=180 width=17) (actual rows= loops=)

198. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=180 width=8) (actual rows= loops=)

199. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4.70..6.50 rows=180 width=8) (actual rows= loops=)

  • Group Key: projectclient.projectid
200. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient (cost=0.00..3.80 rows=180 width=8) (actual rows= loops=)

201. 0.000 0.000 ↓ 0.0

Hash (cost=11.90..11.90 rows=184 width=4) (actual rows= loops=)

202. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project pj_2 (cost=0.14..11.90 rows=184 width=4) (actual rows= loops=)

203. 0.000 0.000 ↓ 0.0

Materialize (cost=0.14..2.18 rows=1 width=24) (actual rows= loops=)

204. 0.000 0.000 ↓ 0.0

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

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

Hash (cost=4.55..4.55 rows=11 width=161) (actual rows= loops=)

206. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3.34..4.55 rows=11 width=161) (actual rows= loops=)

  • Hash Cond: (tk_2.estimatedcostcurrencyid = exchangerate_3.fixedcurrencyid)
207. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.16..2.32 rows=11 width=145) (actual rows= loops=)

  • Hash Cond: (tk_2.estimatedcostcurrencyid = currencyinfo27.id)
208. 0.000 0.000 ↓ 0.0

Seq Scan on task tk_2 (cost=0.00..1.11 rows=11 width=27) (actual rows= loops=)

209. 0.000 0.000 ↓ 0.0

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

210. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo27 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

211. 0.000 0.000 ↓ 0.0

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

212. 0.000 0.000 ↓ 0.0

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

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

Hash (cost=382.54..382.54 rows=184 width=854) (actual rows= loops=)

214. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_3 (cost=0.00..382.54 rows=184 width=854) (actual rows= loops=)

215.          

SubPlan (for Seq Scan)

216. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..1.00 rows=1 width=4) (actual rows= loops=)

217. 0.000 0.000 ↓ 0.0

Index Scan using ixpta2projectid on dm_projecttimeallocation_facts dm_projecttimeallocation_facts_2 (cost=0.29..240.40 rows=336 width=4) (actual rows= loops=)

  • Index Cond: (projectid = pj_3.id)
  • Filter: ((timeoffcodeid IS NULL) AND (breaktypeid IS NULL))
218. 0.000 0.000 ↓ 0.0

Limit (cost=0.29..1.00 rows=1 width=4) (actual rows= loops=)

219. 0.000 0.000 ↓ 0.0

Index Scan Backward using ixpta2projectid on dm_projecttimeallocation_facts dm_projecttimeallocation_facts_3 (cost=0.29..240.40 rows=336 width=4) (actual rows= loops=)

  • Index Cond: (projectid = pj_3.id)
  • Filter: ((timeoffcodeid IS NULL) AND (breaktypeid IS NULL))
220. 0.000 0.000 ↓ 0.0

Hash (cost=10.70..10.70 rows=70 width=548) (actual rows= loops=)

221. 0.000 0.000 ↓ 0.0

Seq Scan on program (cost=0.00..10.70 rows=70 width=548) (actual rows= loops=)

222. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=230 width=22) (actual rows= loops=)

223. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo30 (cost=0.00..8.30 rows=230 width=22) (actual rows= loops=)

224. 0.000 0.000 ↓ 0.0

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

225. 0.000 0.000 ↓ 0.0

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

226. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=230 width=49) (actual rows= loops=)

227. 0.000 0.000 ↓ 0.0

Seq Scan on userinfo userinfo33 (cost=0.00..8.30 rows=230 width=49) (actual rows= loops=)

228. 0.000 0.000 ↓ 0.0

Hash (cost=1,566.02..1,566.02 rows=185 width=12) (actual rows= loops=)

229. 0.000 0.000 ↓ 0.0

Subquery Scan on dmv_projectclients35 (cost=1,562.32..1,566.02 rows=185 width=12) (actual rows= loops=)

230. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,562.32..1,564.17 rows=185 width=48) (actual rows= loops=)

  • Group Key: p.id, pc_10.clientid, pc_10.effectivedate, (CASE WHEN (p.clientbillingallocationmethod = 1) THEN NULL::numeric ELSE (COALESCE(pc_10.costallocationpercentage, '100'::numeric) / '100'::numeric) END), p.clientbillingallocationmethod
231. 0.000 0.000 ↓ 0.0

Append (cost=15.14..1,560.01 rows=185 width=48) (actual rows= loops=)

232. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=15.14..20.34 rows=184 width=48) (actual rows= loops=)

  • Hash Cond: (pc_10.projectid = p.id)
233. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient pc_10 (cost=0.00..3.80 rows=180 width=17) (actual rows= loops=)

234. 0.000 0.000 ↓ 0.0

Hash (cost=12.84..12.84 rows=184 width=8) (actual rows= loops=)

235. 0.000 0.000 ↓ 0.0

Seq Scan on project p (cost=0.00..12.84 rows=184 width=8) (actual rows= loops=)

236. 0.000 0.000 ↓ 0.0

Unique (cost=1,537.80..1,537.82 rows=1 width=48) (actual rows= loops=)

237. 0.000 0.000 ↓ 0.0

Sort (cost=1,537.80..1,537.80 rows=1 width=48) (actual rows= loops=)

  • Sort Key: facts_1.projectid, facts_1.clientid, (CASE WHEN (facts_1.clientid IS NULL) THEN NULL::date ELSE facts_1.effectivedate END), (CASE WHEN (p_1.clientbillingallocationmethod = 1) THEN NULL::numeric ELSE '1'::numeric END), p_1.clientbillingallocationmethod
238. 0.000 0.000 ↓ 0.0

Hash Join (cost=15.14..1,537.79 rows=1 width=48) (actual rows= loops=)

  • Hash Cond: (facts_1.projectid = p_1.id)
  • Join Filter: ((facts_1.clientid IS NULL) OR (p_1.clientbillingallocationmethod = 1))
239. 0.000 0.000 ↓ 0.0

Seq Scan on dm_projectclientcostactuals_facts facts_1 (cost=0.00..1,388.61 rows=51,061 width=12) (actual rows= loops=)

240. 0.000 0.000 ↓ 0.0

Hash (cost=12.84..12.84 rows=184 width=8) (actual rows= loops=)

241. 0.000 0.000 ↓ 0.0

Seq Scan on project p_1 (cost=0.00..12.84 rows=184 width=8) (actual rows= loops=)

242. 0.000 0.000 ↓ 0.0

Hash (cost=35.11..35.11 rows=33 width=159) (actual rows= loops=)

243. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=29.09..35.11 rows=33 width=159) (actual rows= loops=)

  • Merge Cond: (userinfo41.id = cl.clientmanageruserid)
244. 0.000 0.000 ↓ 0.0

Index Scan using userinfo_pkey on userinfo userinfo41 (cost=0.14..11.60 rows=230 width=22) (actual rows= loops=)

245. 0.000 0.000 ↓ 0.0

Sort (cost=28.37..28.45 rows=33 width=145) (actual rows= loops=)

  • Sort Key: cl.clientmanageruserid
246. 0.000 0.000 ↓ 0.0

Index Scan using clients_pkey on clients cl (cost=0.14..27.53 rows=33 width=145) (actual rows= loops=)

247. 0.000 0.000 ↓ 0.0

Hash (cost=50.67..50.67 rows=184 width=100) (actual rows= loops=)

248. 0.000 0.000 ↓ 0.0

Hash Join (cost=40.34..50.67 rows=184 width=100) (actual rows= loops=)

  • Hash Cond: (pj_5.id = pj_4.id)
249. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=25.21..30.43 rows=184 width=21) (actual rows= loops=)

  • Hash Cond: (pc_3.projectid = pj_5.id)
250. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=11.00..15.75 rows=180 width=21) (actual rows= loops=)

  • Hash Cond: ((pc_3.projectid = projectclient_1.projectid) AND (pc_3.effectivedate = (max(projectclient_1.effectivedate))))
251. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient pc_3 (cost=0.00..3.80 rows=180 width=17) (actual rows= loops=)

252. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=180 width=8) (actual rows= loops=)

253. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4.70..6.50 rows=180 width=8) (actual rows= loops=)

  • Group Key: projectclient_1.projectid
254. 0.000 0.000 ↓ 0.0

Seq Scan on projectclient projectclient_1 (cost=0.00..3.80 rows=180 width=8) (actual rows= loops=)

255. 0.000 0.000 ↓ 0.0

Hash (cost=11.90..11.90 rows=184 width=4) (actual rows= loops=)

256. 0.000 0.000 ↓ 0.0

Index Only Scan using project_pkey on project pj_5 (cost=0.14..11.90 rows=184 width=4) (actual rows= loops=)

257. 0.000 0.000 ↓ 0.0

Hash (cost=12.84..12.84 rows=184 width=68) (actual rows= loops=)

258. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_4 (cost=0.00..12.84 rows=184 width=68) (actual rows= loops=)

259. 0.000 0.000 ↓ 0.0

Hash (cost=12.84..12.84 rows=184 width=68) (actual rows= loops=)

260. 0.000 0.000 ↓ 0.0

Seq Scan on project pj_6 (cost=0.00..12.84 rows=184 width=68) (actual rows= loops=)

261. 0.000 0.000 ↓ 0.0

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

262. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo36 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

263. 0.000 0.000 ↓ 0.0

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

264. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo37 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

265. 0.000 0.000 ↓ 0.0

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

266. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo39 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

267. 0.000 0.000 ↓ 0.0

Hash (cost=1.11..1.11 rows=11 width=756) (actual rows= loops=)

268. 0.000 0.000 ↓ 0.0

Seq Scan on activities activities42 (cost=0.00..1.11 rows=11 width=756) (actual rows= loops=)

269. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.57..166,056.64 rows=7,915 width=112) (actual rows= loops=)

  • Group Key: ts_3.id
270. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..11,400.25 rows=300,150 width=41) (actual rows= loops=)

271. 0.000 0.000 ↓ 0.0

Index Scan using timesheet_pkey on timesheet ts_3 (cost=0.28..252.01 rows=7,915 width=28) (actual rows= loops=)

272. 0.000 0.000 ↓ 0.0

Index Scan using ixpta2userid on dm_projecttimeallocation_facts at_3 (cost=0.29..1.12 rows=29 width=33) (actual rows= loops=)

  • Index Cond: ((userid = ts_3.userid) AND (entrydate >= ts_3.startdate) AND (entrydate <= ts_3.enddate))
  • Filter: (breaktypeid IS NULL)
273. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.27..1.59 rows=1 width=68) (actual rows= loops=)

274. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.14..1.42 rows=1 width=92) (actual rows= loops=)

275. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.99..1.26 rows=1 width=92) (actual rows= loops=)

276. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.70..0.88 rows=1 width=52) (actual rows= loops=)

277. 0.000 0.000 ↓ 0.0

Index Scan using dm_projecttimeallocation_facts_pkey on dm_projecttimeallocation_facts at_1 (cost=0.41..0.44 rows=1 width=52) (actual rows= loops=)

  • Index Cond: (id = "*SELECT* 1".timeallocationid)
  • Filter: (breaktypeid IS NULL)
278. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..0.44 rows=1 width=16) (actual rows= loops=)

  • Join Filter: (pj_9.id = pc_5.projectid)
279. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_9 (cost=0.14..0.17 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = at_1.projectid)
  • Filter: (clientbillingallocationmethod = 1)
280. 0.000 0.000 ↓ 0.0

Index Scan using ixpcclientid on projectclient pc_5 (cost=0.14..0.26 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (clientid = at_1.userspecifiedclientid)
  • Filter: ((at_1.entrydate >= effectivedate) AND (at_1.entrydate <= enddate))
281. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..0.37 rows=1 width=52) (actual rows= loops=)

  • Join Filter: ((at_1.entrydate >= pc_4.effectivedate) AND (at_1.entrydate <= pc_4.enddate))
282. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_8 (cost=0.14..0.17 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = at_1.projectid)
  • Filter: (clientbillingallocationmethod = 0)
283. 0.000 0.000 ↓ 0.0

Index Scan using uix4pc_projectclienteffectiveend on projectclient pc_4 (cost=0.14..0.19 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (projectid = pj_8.id)
284. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_7 (cost=0.14..0.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (at_1.projectid = id)
285. 0.000 0.000 ↓ 0.0

Index Scan using task_pkey on task tk_3 (cost=0.14..0.15 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (at_1.taskid = id)
286. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.42..1.82 rows=1 width=107) (actual rows= loops=)

287. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.27..1.58 rows=1 width=100) (actual rows= loops=)

288. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.14..1.42 rows=1 width=100) (actual rows= loops=)

289. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.99..1.26 rows=1 width=100) (actual rows= loops=)

290. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.70..0.88 rows=1 width=56) (actual rows= loops=)

291. 0.000 0.000 ↓ 0.0

Index Scan using dm_projecttimeallocation_facts_pkey on dm_projecttimeallocation_facts at_2 (cost=0.41..0.44 rows=1 width=52) (actual rows= loops=)

  • Index Cond: (id = "*SELECT* 1".timeallocationid)
  • Filter: ((timeoffcodeid IS NULL) AND (breaktypeid IS NULL))
292. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..0.44 rows=1 width=16) (actual rows= loops=)

  • Join Filter: (pj_12.id = pc_7.projectid)
293. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_12 (cost=0.14..0.17 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = at_2.projectid)
  • Filter: (clientbillingallocationmethod = 1)
294. 0.000 0.000 ↓ 0.0

Index Scan using ixpcclientid on projectclient pc_7 (cost=0.14..0.26 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (clientid = at_2.userspecifiedclientid)
  • Filter: ((at_2.entrydate >= effectivedate) AND (at_2.entrydate <= enddate))
295. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..0.37 rows=1 width=52) (actual rows= loops=)

  • Join Filter: ((at_2.entrydate >= pc_6.effectivedate) AND (at_2.entrydate <= pc_6.enddate))
296. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_11 (cost=0.14..0.17 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = at_2.projectid)
  • Filter: (clientbillingallocationmethod = 0)
297. 0.000 0.000 ↓ 0.0

Index Scan using uix4pc_projectclienteffectiveend on projectclient pc_6 (cost=0.14..0.19 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (projectid = pj_11.id)
298. 0.000 0.000 ↓ 0.0

Index Scan using project_pkey on project pj_10 (cost=0.14..0.16 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (at_2.projectid = id)
299. 0.000 0.000 ↓ 0.0

Index Scan using task_pkey on task tk_4 (cost=0.14..0.15 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (at_2.taskid = id)
300. 0.000 0.000 ↓ 0.0

Index Scan using ixuprrhuserid on userprojectroleratehistory uprrh (cost=0.14..0.17 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (at_2.userid = userid)
  • Filter: ((at_2.entrydate >= effectivedate) AND (at_2.entrydate <= enddate))
301. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.10 rows=7 width=122) (actual rows= loops=)

302. 0.000 0.000 ↓ 0.0

Seq Scan on currencyinfo currencyinfo52 (cost=0.00..1.07 rows=7 width=122) (actual rows= loops=)

303. 0.000 0.000 ↓ 0.0

Materialize (cost=229,688.11..331,140.61 rows=1,352,700 width=80) (actual rows= loops=)

304. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=229,688.11..314,231.86 rows=1,352,700 width=92) (actual rows= loops=)

  • Group Key: t.id, uwsf.userid
305. 0.000 0.000 ↓ 0.0

Sort (cost=229,688.11..233,069.86 rows=1,352,700 width=68) (actual rows= loops=)

  • Sort Key: t.id, uwsf.userid
306. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=90,050.56..91,933.13 rows=1,352,700 width=68) (actual rows= loops=)

  • Hash Cond: ((cd.calendarid = c.id) AND ((cd.dateinfo)::date = uwsf.date))
307. 0.000 0.000 ↓ 0.0

Seq Scan on calendardetail cd (cost=0.00..8.66 rows=466 width=12) (actual rows= loops=)

308. 0.000 0.000 ↓ 0.0

Hash (cost=69,760.06..69,760.06 rows=1,352,700 width=68) (actual rows= loops=)

309. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15.48..69,760.06 rows=1,352,700 width=68) (actual rows= loops=)

  • Hash Cond: (uwsf.userid = uc.userid)
310. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..51,145.37 rows=1,352,700 width=64) (actual rows= loops=)

311. 0.000 0.000 ↓ 0.0

Seq Scan on timesheet t (cost=0.00..172.15 rows=7,915 width=28) (actual rows= loops=)

312. 0.000 0.000 ↓ 0.0

Index Scan using dm_userworkschedule_facts_pkey on dm_userworkschedule_facts uwsf (cost=0.42..4.75 rows=169 width=40) (actual rows= loops=)

  • Index Cond: ((userid = t.userid) AND (date >= t.startdate) AND (date <= t.enddate))
313. 0.000 0.000 ↓ 0.0

Hash (cost=9.41..9.41 rows=452 width=8) (actual rows= loops=)

314. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.25..9.41 rows=452 width=8) (actual rows= loops=)

  • Hash Cond: (uc.calendarid = c.id)
315. 0.000 0.000 ↓ 0.0

Seq Scan on usercalendar uc (cost=0.00..6.52 rows=452 width=8) (actual rows= loops=)

316. 0.000 0.000 ↓ 0.0

Hash (cost=1.11..1.11 rows=11 width=4) (actual rows= loops=)

317. 0.000 0.000 ↓ 0.0

Seq Scan on calendar c (cost=0.00..1.11 rows=11 width=4) (actual rows= loops=)

318.          

SubPlan (for Merge Left Join)

319. 0.000 0.000 ↓ 0.0

Sort (cost=2.14..2.15 rows=1 width=520) (actual rows= loops=)

  • Sort Key: dfh.depth
320. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.13 rows=1 width=520) (actual rows= loops=)

  • Join Filter: (dfh.parentid = dept.id)
321. 0.000 0.000 ↓ 0.0

Seq Scan on departmentflathierarchy dfh (cost=0.00..1.06 rows=1 width=8) (actual rows= loops=)

  • Filter: (childid = departments.id)
322. 0.000 0.000 ↓ 0.0

Seq Scan on departments dept (cost=0.00..1.03 rows=3 width=520) (actual rows= loops=)

323. 0.000 0.000 ↓ 0.0

Aggregate (cost=19.10..19.11 rows=1 width=8) (actual rows= loops=)

324. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.29..19.08 rows=2 width=24) (actual rows= loops=)

  • Group Key: "*SELECT* 1_1".userid, "*SELECT* 1_1".entrydate
325. 0.000 0.000 ↓ 0.0

Append (cost=0.29..19.04 rows=2 width=16) (actual rows= loops=)

326. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_1 (cost=0.29..2.34 rows=1 width=16) (actual rows= loops=)

327. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.29..2.33 rows=1 width=24) (actual rows= loops=)

  • Group Key: timeentry.userid, timeentry.entrydate
328. 0.000 0.000 ↓ 0.0

Index Scan using ixte2userid on timeentry (cost=0.29..2.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((userid = "*SELECT* 1".userid) AND (entrydate = "*SELECT* 1".entrydate))
329. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_1 (cost=16.67..16.71 rows=1 width=16) (actual rows= loops=)

330. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=16.67..16.70 rows=1 width=24) (actual rows= loops=)

  • Group Key: dtpp.userid, (COALESCE((dtpldtin.entrydatetime)::date, (dtpldtout.entrydatetime)::date))
331. 0.000 0.000 ↓ 0.0

Sort (cost=16.67..16.67 rows=1 width=16) (actual rows= loops=)

  • Sort Key: (COALESCE((dtpldtin.entrydatetime)::date, (dtpldtout.entrydatetime)::date))
332. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.45..16.66 rows=1 width=16) (actual rows= loops=)

  • Filter: (((dtpldtin.timepunchid IS NOT NULL) OR (dtpldtout.timepunchid IS NOT NULL)) AND (COALESCE((dtpldtin.entrydatetime)::date, (dtpldtout.entrydatetime)::date) = "*SELECT* 1".entrydate))
333. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.30..10.90 rows=4 width=44) (actual rows= loops=)

334. 0.000 0.000 ↓ 0.0

Index Scan using ixdtppinlocaltime2userid on denormalizedtimepunchpair dtpp (cost=0.15..5.22 rows=4 width=36) (actual rows= loops=)

  • Index Cond: (userid = "*SELECT* 1".userid)
335. 0.000 0.000 ↓ 0.0

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on denormalizedtimepunchlocaldatetime dtpldtin (cost=0.15..1.42 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timepunchid = dtpp.starttimepunchid)
336. 0.000 0.000 ↓ 0.0

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on denormalizedtimepunchlocaldatetime dtpldtout (cost=0.15..1.42 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timepunchid = dtpp.endtimepunchid)
337. 0.000 0.000 ↓ 0.0

Aggregate (cost=4.34..4.35 rows=1 width=8) (actual rows= loops=)

338. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.29..4.34 rows=1 width=8) (actual rows= loops=)

339. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2.15..2.16 rows=1 width=16) (actual rows= loops=)

  • Group Key: allocatedtime45.inouttimesheetentryid
340. 0.000 0.000 ↓ 0.0

Index Scan using ixallocatedtimerootid on allocatedtime allocatedtime45 (cost=0.12..2.15 rows=1 width=16) (actual rows= loops=)

  • Filter: ((userid = "*SELECT* 1".userid) AND (entrydate = "*SELECT* 1".entrydate))
341. 0.000 0.000 ↓ 0.0

Index Scan using inouttimesheetentry_pkey on inouttimesheetentry inouttimesheetentry44 (cost=0.15..2.17 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = allocatedtime45.inouttimesheetentryid)
342. 0.000 0.000 ↓ 0.0

Aggregate (cost=19.10..19.11 rows=1 width=8) (actual rows= loops=)

343. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.29..19.08 rows=2 width=24) (actual rows= loops=)

  • Group Key: "*SELECT* 1_2".userid, "*SELECT* 1_2".entrydate
344. 0.000 0.000 ↓ 0.0

Append (cost=0.29..19.04 rows=2 width=16) (actual rows= loops=)

345. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1_2 (cost=0.29..2.34 rows=1 width=16) (actual rows= loops=)

346. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.29..2.33 rows=1 width=24) (actual rows= loops=)

  • Group Key: timeentry_1.userid, timeentry_1.entrydate
347. 0.000 0.000 ↓ 0.0

Index Scan using ixte2userid on timeentry timeentry_1 (cost=0.29..2.31 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((userid = "*SELECT* 1".userid) AND (entrydate = "*SELECT* 1".entrydate))
348. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2_2 (cost=16.67..16.71 rows=1 width=16) (actual rows= loops=)

349. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=16.67..16.70 rows=1 width=24) (actual rows= loops=)

  • Group Key: dtpp_1.userid, (COALESCE((dtpldtin_1.entrydatetime)::date, (dtpldtout_1.entrydatetime)::date))
350. 0.000 0.000 ↓ 0.0

Sort (cost=16.67..16.67 rows=1 width=16) (actual rows= loops=)

  • Sort Key: (COALESCE((dtpldtin_1.entrydatetime)::date, (dtpldtout_1.entrydatetime)::date))
351. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.45..16.66 rows=1 width=16) (actual rows= loops=)

  • Filter: (((dtpldtin_1.timepunchid IS NOT NULL) OR (dtpldtout_1.timepunchid IS NOT NULL)) AND (COALESCE((dtpldtin_1.entrydatetime)::date, (dtpldtout_1.entrydatetime)::date) = "*SELECT* 1".entrydate))
352. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.30..10.90 rows=4 width=44) (actual rows= loops=)

353. 0.000 0.000 ↓ 0.0

Index Scan using ixdtppinlocaltime2userid on denormalizedtimepunchpair dtpp_1 (cost=0.15..5.22 rows=4 width=36) (actual rows= loops=)

  • Index Cond: (userid = "*SELECT* 1".userid)
354. 0.000 0.000 ↓ 0.0

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on denormalizedtimepunchlocaldatetime dtpldtin_1 (cost=0.15..1.42 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timepunchid = dtpp_1.starttimepunchid)
355. 0.000 0.000 ↓ 0.0

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on denormalizedtimepunchlocaldatetime dtpldtout_1 (cost=0.15..1.42 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (timepunchid = dtpp_1.endtimepunchid)
356. 0.000 0.000 ↓ 0.0

Aggregate (cost=4.34..4.35 rows=1 width=8) (actual rows= loops=)

357. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.29..4.34 rows=1 width=8) (actual rows= loops=)

358. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2.15..2.16 rows=1 width=16) (actual rows= loops=)

  • Group Key: allocatedtime48.inouttimesheetentryid
359. 0.000 0.000 ↓ 0.0

Index Scan using ixallocatedtimerootid on allocatedtime allocatedtime48 (cost=0.12..2.15 rows=1 width=16) (actual rows= loops=)

  • Filter: ((userid = "*SELECT* 1".userid) AND (entrydate = "*SELECT* 1".entrydate))
360. 0.000 0.000 ↓ 0.0

Index Scan using inouttimesheetentry_pkey on inouttimesheetentry inouttimesheetentry47 (cost=0.15..2.17 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = allocatedtime48.inouttimesheetentryid)
361. 0.000 0.000 ↓ 0.0

Index Scan using dm_userworkschedule_facts_pkey on dm_userworkschedule_facts dm_userworkschedule_facts50 (cost=0.42..2.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((userid = "*SELECT* 1".userid) AND (date = "*SELECT* 1".entrydate))