explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ovwg

Settings
# exclusive inclusive rows x rows loops node
1. 14,069.087 102,733.440 ↓ 119.3 749,644 1

Sort (cost=322,942.52..322,958.23 rows=6,284 width=6,958) (actual time=101,757.863..102,733.440 rows=749,644 loops=1)

  • Output: ((ui.lastname)::character varying(50)), ((ui.firstname)::character varying(50)), ui.duplicatename, ((login.loginname)::character varying(255)), ui.id, (CASE WHEN ui.disabled THEN 0 ELSE 1 END), ((ui.email)::character varying(255)), ((ui.externalid)::character varying(255)), ((employeetype2.name)::character varying(50)), at.entrydate, ts_1.startdate, ts_1.enddate, ts.id, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), ((currencyinfo6.symbol)::character varying(50)), ubrh.hourlyrate, ((currencyinfo8.symbol)::character varying(50)), ((ubrh.hourlyrate * exchangerate.exchangevalue)), ((at.comments)::text), (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), ((timeoffcode9.name)::character varying(255)), ((userinfo10.displayname)::text), ta.timestamputc, tslist.timesheetstatus, tah.timestamputc, ts_1.id, ((sheetapprovalhistorykeyvalue13.uri)::text), ((sheetapprovalhistorykeyvalue14.uri)::text), tah.action, ((tah.approvalcomments)::text), ((cl.name)::character varying(255)), cl.id, ((cl.code)::character varying(50)), ((pj.description)::character varying(255)), ((pj.name)::character varying(255)), pj.id, ((pj.code)::character varying(50)), ((tk.name)::character varying(255)), tk.id, ((tk.code)::character varying(50)), (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), ((tk.description)::character varying(255)), pj.timeandexpenseentrytype, ((br.name)::character varying(50)), ((dep.name)::character varying(255)), ((dep.code)::character varying(50)), ((location20.name)::character varying(100)), ts.userid
  • 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", (CASE WHEN ui.disabled THEN 0 ELSE 1 END), ((ui.email)::character varying(255)) COLLATE "en_US", ((ui.externalid)::character varying(255)) COLLATE "en_US", ((employeetype2.name)::character varying(50)) COLLATE "en_US", at.entrydate, ts_1.startdate, ts_1.enddate, ((currencyinfo6.symbol)::character varying(50)) COLLATE "en_US", ubrh.hourlyrate, ((currencyinfo8.symbol)::character varying(50)) COLLATE "en_US", ((ubrh.hourlyrate * exchangerate.exchangevalue)), ((at.comments)::text) COLLATE "en_US", ((timeoffcode9.name)::character varying(255)) COLLATE "en_US", ((userinfo10.displayname)::text) COLLATE "en_US", ta.timestamputc, tslist.timesheetstatus, tah.timestamputc, ((tah.approvalcomments)::text) COLLATE "en_US", ((cl.name)::character varying(255)) COLLATE "en_US", ((cl.code)::character varying(50)) COLLATE "en_US", ((pj.description)::character varying(255)) COLLATE "en_US", ((pj.name)::character varying(255)) COLLATE "en_US", ((pj.code)::character varying(50)) COLLATE "en_US", ((tk.name)::character varying(255)) COLLATE "en_US", ((tk.code)::character varying(50)) COLLATE "en_US", (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), ((tk.description)::character varying(255)) COLLATE "en_US", pj.timeandexpenseentrytype, ((br.name)::character varying(50)) COLLATE "en_US", ((dep.name)::character varying(255)) COLLATE "en_US", ((dep.code)::character varying(50)) COLLATE "en_US", ((location20.name)::character varying(100)) COLLATE "en_US
  • Sort Method: external merge Disk: 472352kB
  • Buffers: shared hit=44832554, temp read=59044 written=59046
2.          

Initplan (for Sort)

3. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".systeminformation (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Output: systeminformation.basecurrencyid
  • Buffers: shared hit=1
4. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".systeminformation systeminformation_1 (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Output: systeminformation_1.basecurrencyid
  • Buffers: shared hit=1
5. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".systeminformation systeminformation_2 (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Output: systeminformation_2.basecurrencyid
  • Buffers: shared hit=1
6. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".projectsysteminformation (cost=0.00..1.01 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=1)

  • Output: projectsysteminformation.usercustombillingrateid
  • Buffers: shared hit=1
7. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".projectsysteminformation projectsysteminformation_1 (cost=0.00..1.01 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=1)

  • Output: projectsysteminformation_1.usercustombillingrateid
  • Buffers: shared hit=1
8. 673.408 88,664.335 ↓ 119.3 749,644 1

Hash Left Join (cost=14,317.24..322,541.03 rows=6,284 width=6,958) (actual time=124.736..88,664.335 rows=749,644 loops=1)

  • Output: ui.lastname, ui.firstname, ui.duplicatename, login.loginname, ui.id, CASE WHEN ui.disabled THEN 0 ELSE 1 END, ui.email, ui.externalid, employeetype2.name, at.entrydate, ts_1.startdate, ts_1.enddate, ts.id, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), currencyinfo6.symbol, ubrh.hourlyrate, currencyinfo8.symbol, (ubrh.hourlyrate * exchangerate.exchangevalue), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), timeoffcode9.name, userinfo10.displayname, ta.timestamputc, tslist.timesheetstatus, tah.timestamputc, ts_1.id, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, tah.action, tah.approvalcomments, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, tk.name, tk.id, tk.code, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END), tk.description, pj.timeandexpenseentrytype, br.name, dep.name, dep.code, location20.name, ts.userid
  • Inner Unique: true
  • Hash Cond: (userlocation22.locationid = location20.id)
  • Buffers: shared hit=44832505
9. 914.701 87,990.916 ↓ 119.3 749,644 1

Nested Loop Left Join (cost=14,316.13..322,493.73 rows=6,284 width=2,129) (actual time=124.703..87,990.916 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype, br.name, tk.name, tk.id, tk.code, tk.description, dep.name, dep.code, userlocation22.locationid, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END)
  • Buffers: shared hit=44832504
10. 362.498 86,326.571 ↓ 119.3 749,644 1

Hash Join (cost=14,315.85..320,473.21 rows=6,284 width=2,113) (actual time=124.651..86,326.571 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype, br.name, tk.name, tk.id, tk.code, tk.description, dep.name, dep.code, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END)
  • Hash Cond: (ts.userid = du.userid)
  • Buffers: shared hit=43255337
11. 428.776 85,961.912 ↓ 115.5 749,644 1

Hash Left Join (cost=14,179.74..320,249.51 rows=6,489 width=2,087) (actual time=122.452..85,961.912 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype, br.name, tk.name, tk.id, tk.code, tk.description, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END)
  • Hash Cond: (at.taskid = tk.id)
  • Buffers: shared hit=43255311
12. 223.869 85,513.594 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,830.35..318,814.19 rows=6,489 width=1,545) (actual time=102.847..85,513.594 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype, br.name
  • Buffers: shared hit=43254789
13. 436.655 65,049.337 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,828.49..304,023.34 rows=6,489 width=1,515) (actual time=102.695..65,049.337 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code, pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype
  • Inner Unique: true
  • Buffers: shared hit=25047223
14. 366.637 63,113.394 ↓ 115.5 749,644 1

Hash Left Join (cost=12,828.21..302,049.80 rows=6,489 width=944) (actual time=102.680..63,113.394 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri, cl.name, cl.id, cl.code
  • Inner Unique: true
  • Hash Cond: ((CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END) = cl.id)
  • Buffers: shared hit=22934621
15. 696.931 62,746.636 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,815.01..302,019.34 rows=6,489 width=904) (actual time=102.545..62,746.636 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue14.uri
  • Buffers: shared hit=22934615
16. 684.818 38,810.741 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,814.58..286,933.56 rows=6,489 width=844) (actual time=102.527..38,810.741 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, tah.id, ta.timestamputc, sheetapprovalhistorykeyvalue13.uri
  • Buffers: shared hit=19213483
17. 510.444 14,137.315 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,814.14..271,912.66 rows=6,489 width=768) (actual time=102.500..14,137.315 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, tah.id, ta.timestamputc
  • Buffers: shared hit=15492351
18. 356.149 8,379.363 ↓ 115.5 749,644 1

Nested Loop Left Join (cost=12,812.89..262,316.00 rows=6,489 width=760) (actual time=102.456..8,379.363 rows=749,644 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname, tah.timestamputc, tah.action, tah.approvalcomments, tah.id
  • Buffers: shared hit=6497559
19. 513.057 4,092.218 ↓ 50.5 327,583 1

Nested Loop Left Join (cost=12,812.05..248,839.38 rows=6,489 width=699) (actual time=102.417..4,092.218 rows=327,583 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userinfo10.displayname
  • Inner Unique: true
  • Buffers: shared hit=912286
20. 150.732 3,251.578 ↓ 50.5 327,583 1

Hash Left Join (cost=12,811.77..246,318.45 rows=6,489 width=687) (actual time=102.399..3,251.578 rows=327,583 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name, userhierarchy21.supervisorid
  • Hash Cond: (ui.id = userhierarchy21.userid)
  • Buffers: shared hit=29968
21. 119.817 3,100.444 ↓ 50.5 327,583 1

Hash Left Join (cost=12,753.12..246,182.55 rows=6,489 width=683) (actual time=101.989..3,100.444 rows=327,583 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol, timeoffcode9.name
  • Inner Unique: true
  • Hash Cond: (at.timeoffcodeid = timeoffcode9.id)
  • Buffers: shared hit=29954
22. 172.346 2,980.606 ↓ 50.5 327,583 1

Hash Join (cost=12,751.02..246,163.36 rows=6,489 width=667) (actual time=101.956..2,980.606 rows=327,583 loops=1)

  • Output: currencyinfo8.symbol, ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timeoffcodeid, at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol
  • Hash Cond: (ts.userid = ubrh.userid)
  • Buffers: shared hit=29953
23. 138.446 2,802.668 ↓ 1.0 327,583 1

Hash Join (cost=12,580.00..244,713.69 rows=323,555 width=404) (actual time=96.352..2,802.668 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timeoffcodeid, at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, ts_1.startdate, ts_1.enddate, ts_1.id, tslist.timesheetstatus
  • Inner Unique: true
  • Hash Cond: (ts.id = ts_1.id)
  • Buffers: shared hit=29909
24. 131.384 2,644.896 ↓ 1.0 327,583 1

Hash Join (cost=10,478.88..241,763.18 rows=323,555 width=412) (actual time=76.769..2,644.896 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timesheetid, at.timeoffcodeid, at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, login.loginname, login.userid, employeetype2.name, tslist.timesheetstatus, tslist.timesheetid
  • Inner Unique: true
  • Hash Cond: (ui.employeetypeid = employeetype2.id)
  • Buffers: shared hit=29215
25. 150.538 2,513.500 ↓ 1.0 327,583 1

Hash Join (cost=10,477.54..240,672.55 rows=323,555 width=298) (actual time=76.737..2,513.500 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timesheetid, at.timeoffcodeid, at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, ui.employeetypeid, login.loginname, login.userid, tslist.timesheetstatus, tslist.timesheetid
  • Inner Unique: true
  • Hash Cond: (ts.userid = login.userid)
  • Buffers: shared hit=29214
26. 168.263 2,361.540 ↓ 1.0 327,583 1

Hash Join (cost=10,284.96..239,627.52 rows=324,432 width=275) (actual time=75.279..2,361.540 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timesheetid, at.timeoffcodeid, at.projectid, at.taskid, ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, ui.employeetypeid, tslist.timesheetstatus, tslist.timesheetid
  • Inner Unique: true
  • Hash Cond: (ts.userid = ui.id)
  • Buffers: shared hit=29121
27. 132.250 2,190.699 ↓ 1.0 327,583 1

Hash Join (cost=10,076.10..238,566.22 rows=324,432 width=220) (actual time=72.663..2,190.699 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timesheetid, at.timeoffcodeid, at.projectid, at.taskid, tslist.timesheetstatus, tslist.timesheetid
  • Inner Unique: true
  • Hash Cond: (ts.id = tslist.timesheetid)
  • Buffers: shared hit=29012
28. 152.317 2,026.768 ↓ 1.0 327,583 1

Hash Join (cost=4,272.15..231,905.61 rows=326,322 width=200) (actual time=40.747..2,026.768 rows=327,583 loops=1)

  • Output: ts.id, ts.userid, at.entrydate, at.userid, (NULL::uuid), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.id, (CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END), (CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), (CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END), at.comments, (CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END), at.timesheetid, at.timeoffcodeid, at.projectid, at.taskid
  • Inner Unique: true
  • Hash Cond: (at.timesheetid = ts.id)
  • Buffers: shared hit=24610
29. 1,495.965 1,855.599 ↓ 1.0 328,785 1

Hash Left Join (cost=2,171.03..225,668.13 rows=327,628 width=628) (actual time=21.341..1,855.599 rows=328,785 loops=1)

  • Output: at.id, at.userid, at.entrydate, NULL::uuid, CASE WHEN (at.breaktypeid IS NULL) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END, at.comments, CASE WHEN (pj_1.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END, NULL::date, at.projectid, at.taskid, NULL::integer, at.timeoffcodeid, NULL::uuid, NULL::interval, CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END, NULL::interval, CASE WHEN (at.timeoffcodeid IS NOT NULL) THEN at.duration ELSE '00:00:00'::interval END, CASE WHEN ((at.timeoffcodeid IS NULL) AND (at.projectid IS NOT NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END, NULL::interval, CASE WHEN ((at.timeoffcodeid IS NULL) AND "546dd0d1bd304cf883cf684215da2167".timeallocationisbillableordefault(at.isbillable, at.projectid)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END, CASE WHEN ((at.timeoffcodeid IS NULL) AND (NOT "546dd0d1bd304cf883cf684215da2167".timeallocationisbillableordefault(at.isbillable, at.projectid)) AND (at.breaktypeid IS NULL)) THEN (at.duration * (COALESCE(((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)), '1'::numeric))::double precision) ELSE '00:00:00'::interval END, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::character varying, NULL::timestamp without time zone, at.timesheetid, NULL::uuid
  • Hash Cond: (at.projectid = pj_1.id)
  • Join Filter: ((at.entrydate >= pc.effectivedate) AND (at.entrydate <= pc.enddate))
  • Buffers: shared hit=23919
30. 142.349 341.069 ↓ 1.0 328,785 1

Hash Left Join (cost=687.68..45,512.51 rows=327,628 width=133) (actual time=2.692..341.069 rows=328,785 loops=1)

  • Output: at.id, at.userid, at.entrydate, at.breaktypeid, at.duration, at.comments, at.userspecifiedclientid, at.projectid, at.taskid, at.timeoffcodeid, at.isbillable, at.timesheetid
  • Hash Cond: ((at.projectid = pj_2.id) AND (at.userspecifiedclientid = pc_1.clientid))
  • Join Filter: ((at.entrydate >= pc_1.effectivedate) AND (at.entrydate <= pc_1.enddate))
  • Buffers: shared hit=23276
31. 196.060 196.060 ↓ 1.0 328,785 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".dm_attendancetimeallocation_facts at (cost=0.00..42,367.61 rows=327,628 width=133) (actual time=0.012..196.060 rows=328,785 loops=1)

  • Output: at.id, at.userid, at.entrydate, at.comments, at.duration, at.projectid, at.taskid, at.activityid, at.billingrateid, at.timeoffcodeid, at.breaktypeid, at.timesheetid, at.timeentryinfo1, at.timeentryinfo2, at.timeentryinfo3, at.timeentryinfo4, at.timeentryinfo5, at.timeoffinfo1, at.timeoffinfo2, at.timeoffinfo3, at.timeoffinfo4, at.timeoffinfo5, at.userspecifiedclientid, at.isbillable
  • Filter: ((at.entrydate >= '2019-11-01'::date) AND (at.entrydate <= '2020-06-30'::date))
  • Rows Removed by Filter: 976254
  • Buffers: shared hit=22793
32. 0.001 2.660 ↓ 0.0 0 1

Hash (cost=687.66..687.66 rows=1 width=16) (actual time=2.660..2.660 rows=0 loops=1)

  • Output: pj_2.id, pc_1.effectivedate, pc_1.enddate, pc_1.clientid
  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=483
33. 0.001 2.659 ↓ 0.0 0 1

Nested Loop (cost=0.29..687.66 rows=1 width=16) (actual time=2.659..2.659 rows=0 loops=1)

  • Output: pj_2.id, pc_1.effectivedate, pc_1.enddate, pc_1.clientid
  • Buffers: shared hit=483
34. 2.658 2.658 ↓ 0.0 0 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".project pj_2 (cost=0.00..686.35 rows=1 width=4) (actual time=2.658..2.658 rows=0 loops=1)

  • Output: pj_2.id
  • Filter: (pj_2.clientbillingallocationmethod = 1)
  • Rows Removed by Filter: 16281
  • Buffers: shared hit=483
35. 0.000 0.000 ↓ 0.0 0

Index Only Scan using uix4pc_projectclienteffectiveend on "546dd0d1bd304cf883cf684215da2167".projectclient pc_1 (cost=0.29..1.30 rows=1 width=16) (never executed)

  • Output: pc_1.projectid, pc_1.clientid, pc_1.effectivedate, pc_1.enddate
  • Index Cond: (pc_1.projectid = pj_2.id)
  • Heap Fetches: 0
36. 3.192 18.565 ↓ 1.0 16,281 1

Hash (cost=1,281.25..1,281.25 rows=16,168 width=52) (actual time=18.564..18.565 rows=16,281 loops=1)

  • Output: pj_1.clientbillingallocationmethod, pj_1.id, pc.clientid, pc.effectivedate, pc.enddate, ((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric))
  • Buckets: 16384 Batches: 1 Memory Usage: 1035kB
  • Buffers: shared hit=630
37. 4.045 15.373 ↓ 1.0 16,281 1

Hash Join (cost=889.70..1,281.25 rows=16,168 width=52) (actual time=5.993..15.373 rows=16,281 loops=1)

  • Output: pj_1.clientbillingallocationmethod, pj_1.id, pc.clientid, pc.effectivedate, pc.enddate, ((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric))
  • Inner Unique: true
  • Hash Cond: (pc.projectid = pj_1.id)
  • Buffers: shared hit=630
38. 5.411 5.411 ↓ 1.0 16,281 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".projectclient pc (cost=0.00..349.10 rows=16,168 width=48) (actual time=0.009..5.411 rows=16,281 loops=1)

  • Output: pc.clientid, pc.projectid, pc.effectivedate, pc.enddate, (COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)
  • Buffers: shared hit=147
39. 2.244 5.917 ↓ 1.0 16,281 1

Hash (cost=686.35..686.35 rows=16,268 width=8) (actual time=5.917..5.917 rows=16,281 loops=1)

  • Output: pj_1.clientbillingallocationmethod, pj_1.id
  • Buckets: 16384 Batches: 1 Memory Usage: 764kB
  • Buffers: shared hit=483
40. 3.673 3.673 ↓ 1.0 16,281 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".project pj_1 (cost=0.00..686.35 rows=16,268 width=8) (actual time=0.003..3.673 rows=16,281 loops=1)

  • Output: pj_1.clientbillingallocationmethod, pj_1.id
  • Filter: (pj_1.clientbillingallocationmethod = 0)
  • Buffers: shared hit=483
41. 10.297 18.852 ↑ 1.0 62,309 1

Hash (cost=1,317.72..1,317.72 rows=62,672 width=20) (actual time=18.852..18.852 rows=62,309 loops=1)

  • Output: ts.id, ts.userid
  • Buckets: 65536 Batches: 1 Memory Usage: 3677kB
  • Buffers: shared hit=691
42. 8.555 8.555 ↑ 1.0 62,309 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".timesheet ts (cost=0.00..1,317.72 rows=62,672 width=20) (actual time=0.004..8.555 rows=62,309 loops=1)

  • Output: ts.id, ts.userid
  • Buffers: shared hit=691
43. 11.283 31.681 ↑ 1.0 62,309 1

Hash (cost=5,025.09..5,025.09 rows=62,309 width=20) (actual time=31.681..31.681 rows=62,309 loops=1)

  • Output: tslist.timesheetstatus, tslist.timesheetid
  • Buckets: 65536 Batches: 1 Memory Usage: 3677kB
  • Buffers: shared hit=4402
44. 20.398 20.398 ↑ 1.0 62,309 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".dm_timesheetlist_facts tslist (cost=0.00..5,025.09 rows=62,309 width=20) (actual time=0.005..20.398 rows=62,309 loops=1)

  • Output: tslist.timesheetstatus, tslist.timesheetid
  • Buffers: shared hit=4402
45. 1.203 2.578 ↑ 1.0 4,438 1

Hash (cost=153.38..153.38 rows=4,438 width=55) (actual time=2.578..2.578 rows=4,438 loops=1)

  • Output: ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, ui.employeetypeid
  • Buckets: 8192 Batches: 1 Memory Usage: 461kB
  • Buffers: shared hit=109
46. 1.375 1.375 ↑ 1.0 4,438 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".userinfo ui (cost=0.00..153.38 rows=4,438 width=55) (actual time=0.004..1.375 rows=4,438 loops=1)

  • Output: ui.lastname, ui.firstname, ui.duplicatename, ui.id, ui.disabled, ui.email, ui.externalid, ui.employeetypeid
  • Buffers: shared hit=109
47. 0.762 1.422 ↓ 1.0 4,438 1

Hash (cost=137.26..137.26 rows=4,426 width=23) (actual time=1.422..1.422 rows=4,438 loops=1)

  • Output: login.loginname, login.userid
  • Buckets: 8192 Batches: 1 Memory Usage: 313kB
  • Buffers: shared hit=93
48. 0.660 0.660 ↓ 1.0 4,438 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".login (cost=0.00..137.26 rows=4,426 width=23) (actual time=0.004..0.660 rows=4,438 loops=1)

  • Output: login.loginname, login.userid
  • Buffers: shared hit=93
49. 0.005 0.012 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=122) (actual time=0.012..0.012 rows=15 loops=1)

  • Output: employeetype2.name, employeetype2.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
50. 0.007 0.007 ↑ 1.0 15 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".employeetype employeetype2 (cost=0.00..1.15 rows=15 width=122) (actual time=0.005..0.007 rows=15 loops=1)

  • Output: employeetype2.name, employeetype2.id
  • Buffers: shared hit=1
51. 10.491 19.326 ↑ 1.0 62,309 1

Hash (cost=1,317.72..1,317.72 rows=62,672 width=24) (actual time=19.326..19.326 rows=62,309 loops=1)

  • Output: ts_1.startdate, ts_1.enddate, ts_1.id
  • Buckets: 65536 Batches: 1 Memory Usage: 3920kB
  • Buffers: shared hit=691
52. 8.835 8.835 ↑ 1.0 62,309 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".timesheet ts_1 (cost=0.00..1,317.72 rows=62,672 width=24) (actual time=0.005..8.835 rows=62,309 loops=1)

  • Output: ts_1.startdate, ts_1.enddate, ts_1.id
  • Buffers: shared hit=691
53. 0.816 5.592 ↓ 49.9 4,437 1

Hash (cost=169.91..169.91 rows=89 width=263) (actual time=5.591..5.592 rows=4,437 loops=1)

  • Output: currencyinfo8.symbol, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol
  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 298kB
  • Buffers: shared hit=44
54. 0.938 4.776 ↓ 49.9 4,437 1

Hash Join (cost=3.34..169.91 rows=89 width=263) (actual time=0.072..4.776 rows=4,437 loops=1)

  • Output: currencyinfo8.symbol, ubrh.hourlyrate, ubrh.userid, exchangerate.exchangevalue, currencyinfo6.symbol
  • Inner Unique: true
  • Hash Cond: (ubrh.currencyid = currencyinfo6.id)
  • Buffers: shared hit=44
55. 0.530 3.831 ↓ 49.9 4,437 1

Nested Loop (cost=2.19..168.37 rows=89 width=153) (actual time=0.055..3.831 rows=4,437 loops=1)

  • Output: currencyinfo8.symbol, ubrh.hourlyrate, ubrh.currencyid, ubrh.userid, exchangerate.exchangevalue, exchangerate.fixedcurrencyid
  • Buffers: shared hit=43
56. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".currencyinfo currencyinfo8 (cost=0.00..1.09 rows=1 width=118) (actual time=0.006..0.007 rows=1 loops=1)

  • Output: currencyinfo8.id, currencyinfo8.symbol, currencyinfo8.name, currencyinfo8.disabled
  • Filter: ($1 = currencyinfo8.id)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=2
57. 1.025 3.294 ↓ 49.9 4,437 1

Hash Join (cost=2.19..166.40 rows=89 width=35) (actual time=0.047..3.294 rows=4,437 loops=1)

  • Output: ubrh.hourlyrate, ubrh.currencyid, ubrh.userid, exchangerate.exchangevalue, exchangerate.fixedcurrencyid
  • Hash Cond: (ubrh.currencyid = exchangerate.fixedcurrencyid)
  • Buffers: shared hit=41
58. 2.244 2.244 ↓ 1.0 4,437 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".userbillingratehistory ubrh (cost=0.00..146.98 rows=4,359 width=11) (actual time=0.012..2.244 rows=4,437 loops=1)

  • Output: ubrh.id, ubrh.userid, ubrh.effectivedate, ubrh.enddate, ubrh.currencyid, ubrh.hourlyrate
  • Filter: ((('now'::cstring)::date >= ubrh.effectivedate) AND (('now'::cstring)::date <= ubrh.enddate))
  • Buffers: shared hit=38
59. 0.003 0.025 ↓ 7.0 7 1

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

  • Output: exchangerate.exchangevalue, exchangerate.fixedcurrencyid
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
60. 0.022 0.022 ↓ 7.0 7 1

Index Scan using uix3er_currencyideffectivedate on "546dd0d1bd304cf883cf684215da2167".exchangerate (cost=0.14..2.17 rows=1 width=24) (actual time=0.017..0.022 rows=7 loops=1)

  • Output: exchangerate.exchangevalue, exchangerate.fixedcurrencyid
  • Index Cond: ((exchangerate.variablecurrencyid = $0) AND (('now'::cstring)::date >= exchangerate.effectivedate))
  • Filter: (('now'::cstring)::date <= exchangerate.enddate)
  • Buffers: shared hit=3
61. 0.003 0.007 ↑ 1.0 7 1

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

  • Output: currencyinfo6.symbol, currencyinfo6.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
62. 0.004 0.004 ↑ 1.0 7 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".currencyinfo currencyinfo6 (cost=0.00..1.07 rows=7 width=122) (actual time=0.003..0.004 rows=7 loops=1)

  • Output: currencyinfo6.symbol, currencyinfo6.id
  • Buffers: shared hit=1
63. 0.011 0.021 ↑ 1.0 49 1

Hash (cost=1.49..1.49 rows=49 width=24) (actual time=0.021..0.021 rows=49 loops=1)

  • Output: timeoffcode9.name, timeoffcode9.id
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
64. 0.010 0.010 ↑ 1.0 49 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".timeoffcode timeoffcode9 (cost=0.00..1.49 rows=49 width=24) (actual time=0.005..0.010 rows=49 loops=1)

  • Output: timeoffcode9.name, timeoffcode9.id
  • Buffers: shared hit=1
65. 0.170 0.402 ↑ 1.1 1,300 1

Hash (cost=41.13..41.13 rows=1,401 width=8) (actual time=0.402..0.402 rows=1,300 loops=1)

  • Output: userhierarchy21.userid, userhierarchy21.supervisorid
  • Buckets: 2048 Batches: 1 Memory Usage: 67kB
  • Buffers: shared hit=14
66. 0.232 0.232 ↑ 1.1 1,300 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".userhierarchy userhierarchy21 (cost=0.00..41.13 rows=1,401 width=8) (actual time=0.005..0.232 rows=1,300 loops=1)

  • Output: userhierarchy21.userid, userhierarchy21.supervisorid
  • Filter: (('2020-05-18'::date >= userhierarchy21.startdate) AND ('2020-05-18'::date <= userhierarchy21.enddate))
  • Rows Removed by Filter: 381
  • Buffers: shared hit=14
67. 327.583 327.583 ↑ 1.0 1 327,583

Index Scan using userinfo_pkey on "546dd0d1bd304cf883cf684215da2167".userinfo userinfo10 (cost=0.28..0.39 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=327,583)

  • Output: userinfo10.id, userinfo10.firstname, userinfo10.lastname, userinfo10.slug, userinfo10.email, userinfo10.startdate, userinfo10.enddate, userinfo10.externalid, userinfo10.disabled, userinfo10.info1, userinfo10.info2, userinfo10.info3, userinfo10.info4, userinfo10.info5, userinfo10.info6, userinfo10.info7, userinfo10.info8, userinfo10.info9, userinfo10.info10, userinfo10.info11, userinfo10.info12, userinfo10.info13, userinfo10.info14, userinfo10.info15, userinfo10.info16, userinfo10.info17, userinfo10.info18, userinfo10.info19, userinfo10.info20, userinfo10.info21, userinfo10.info22, userinfo10.info23, userinfo10.info24, userinfo10.info25, userinfo10.info26, userinfo10.info27, userinfo10.info28, userinfo10.info29, userinfo10.info30, userinfo10.info31, userinfo10.info32, userinfo10.info33, userinfo10.info34, userinfo10.info35, userinfo10.info36, userinfo10.info37, userinfo10.info38, userinfo10.info39, userinfo10.info40, userinfo10.info41, userinfo10.info42, userinfo10.info43, userinfo10.info44, userinfo10.info45, userinfo10.info46, userinfo10.info47, userinfo10.info48, userinfo10.info49, userinfo10.info50, userinfo10.languageid, userinfo10.employeetypeid, userinfo10.timezoneid, userinfo10.duplicatename, userinfo10.displayname, userinfo10.issampleuser, userinfo10.defaultactivityid, userinfo10.guidid
  • Index Cond: (userhierarchy21.supervisorid = userinfo10.id)
  • Buffers: shared hit=882318
68. 738.199 3,930.996 ↓ 2.0 2 327,583

Nested Loop Left Join (cost=0.84..2.07 rows=1 width=77) (actual time=0.006..0.012 rows=2 loops=327,583)

  • Output: tah.timestamputc, tah.action, tah.approvalcomments, tah.timesheetid, tah.id
  • Inner Unique: true
  • Filter: ((tahls_1.timesheetid IS NULL) OR (tah.serialnumber > tahls_1.lastsubmitserialnumber))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=5585273
69. 1,637.915 1,637.915 ↑ 1.5 2 327,583

Index Scan using ixtah2timesheetid on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistory tah (cost=0.42..0.72 rows=3 width=81) (actual time=0.003..0.005 rows=2 loops=327,583)

  • Output: tah.id, tah.serialnumber, tah.timesheetid, tah.action, tah.approvalcomments, tah.timestamputc, tah.approvalagenttype, tah.userid, tah.systemprocessidentifier
  • Index Cond: (ts_1.id = tah.timesheetid)
  • Filter: (((tah.systemprocessidentifier IS NULL) OR (tah.systemprocessidentifier <> 'urn:replicon:approval-system-process:timesheet-submit-script-data-and-validation'::text)) AND (tah.action = ANY ('{2,3,6}'::integer[])))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=2470714
70. 1,554.882 1,554.882 ↑ 1.0 1 777,441

Index Scan using timesheetapprovalhistorylastsubmit_pkey on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistorylastsubmit tahls_1 (cost=0.41..0.44 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=777,441)

  • Output: tahls_1.timesheetid, tahls_1.lastsubmitserialnumber
  • Index Cond: (tah.timesheetid = tahls_1.timesheetid)
  • Buffers: shared hit=3114559
71. 753.244 5,247.508 ↑ 1.0 1 749,644

Nested Loop (cost=1.25..1.47 rows=1 width=24) (actual time=0.007..0.007 rows=1 loops=749,644)

  • Output: tahls.timesheetid, ta.timestamputc
  • Inner Unique: true
  • Buffers: shared hit=8994792
72. 3.600 2,998.576 ↑ 1.0 1 749,644

Nested Loop (cost=0.84..1.02 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=749,644)

  • Output: tahls.timesheetid, ta.timestamputc
  • Inner Unique: true
  • Buffers: shared hit=6001665
73. 1,499.288 1,499.288 ↑ 1.0 1 749,644

Index Scan using timesheetapprovalhistorylastsubmit_pkey on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistorylastsubmit tahls (cost=0.41..0.44 rows=1 width=20) (actual time=0.001..0.002 rows=1 loops=749,644)

  • Output: tahls.timesheetid, tahls.lastsubmitserialnumber
  • Index Cond: (ts_1.id = tahls.timesheetid)
  • Buffers: shared hit=3007319
74. 1,495.688 1,495.688 ↑ 1.0 1 747,844

Index Scan using uixtahsn on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistory ta (cost=0.42..0.57 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=747,844)

  • Output: ta.id, ta.serialnumber, ta.timesheetid, ta.action, ta.approvalcomments, ta.timestamputc, ta.approvalagenttype, ta.userid, ta.systemprocessidentifier
  • Index Cond: (ta.serialnumber = tahls.lastsubmitserialnumber)
  • Buffers: shared hit=2994346
75. 1,495.688 1,495.688 ↑ 1.0 1 747,844

Index Scan using timesheet_pkey on "546dd0d1bd304cf883cf684215da2167".timesheet ts_2 (cost=0.41..0.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=747,844)

  • Output: ts_2.id, ts_2.userid, ts_2.startdate, ts_2.enddate, ts_2.approvalstatus, ts_2.duedate, ts_2.autosubmitdatetimeutc, ts_2.lastautosubmitattemptdatetimeutc, ts_2.createdonutc
  • Index Cond: (ts_2.id = tahls.timesheetid)
  • Filter: (ts_2.approvalstatus = ANY ('{1,2}'::integer[]))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2993127
76. 23,988.608 23,988.608 ↑ 1.0 1 749,644

Index Scan using ixtahkvtimesheetapprovalhistoryid on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue13 (cost=0.43..2.30 rows=1 width=92) (actual time=0.031..0.032 rows=1 loops=749,644)

  • Output: sheetapprovalhistorykeyvalue13.id, sheetapprovalhistorykeyvalue13.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue13.parentid, sheetapprovalhistorykeyvalue13.index, sheetapprovalhistorykeyvalue13.key, sheetapprovalhistorykeyvalue13.uri, sheetapprovalhistorykeyvalue13.slug, sheetapprovalhistorykeyvalue13."boolean", sheetapprovalhistorykeyvalue13.date, sheetapprovalhistorykeyvalue13.number, sheetapprovalhistorykeyvalue13.text, sheetapprovalhistorykeyvalue13."time", sheetapprovalhistorykeyvalue13.timespan, sheetapprovalhistorykeyvalue13.daterange_startdate, sheetapprovalhistorykeyvalue13.daterange_enddate, sheetapprovalhistorykeyvalue13.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue13.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue13.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue13.workdayduration_workdays, sheetapprovalhistorykeyvalue13.workdayduration_hours, sheetapprovalhistorykeyvalue13.workdayduration_minutes
  • Index Cond: (tah.id = sheetapprovalhistorykeyvalue13.timesheetapprovalhistoryid)
  • Filter: (upper(sheetapprovalhistorykeyvalue13.key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-ACTUAL-USER'::text)
  • Rows Removed by Filter: 25
  • Buffers: shared hit=3721132
77. 23,238.964 23,238.964 ↑ 2.0 1 749,644

Index Scan using ixtahkvtimesheetapprovalhistoryid on "546dd0d1bd304cf883cf684215da2167".timesheetapprovalhistorykeyvalue sheetapprovalhistorykeyvalue14 (cost=0.43..2.30 rows=2 width=92) (actual time=0.031..0.031 rows=1 loops=749,644)

  • Output: sheetapprovalhistorykeyvalue14.id, sheetapprovalhistorykeyvalue14.timesheetapprovalhistoryid, sheetapprovalhistorykeyvalue14.parentid, sheetapprovalhistorykeyvalue14.index, sheetapprovalhistorykeyvalue14.key, sheetapprovalhistorykeyvalue14.uri, sheetapprovalhistorykeyvalue14.slug, sheetapprovalhistorykeyvalue14."boolean", sheetapprovalhistorykeyvalue14.date, sheetapprovalhistorykeyvalue14.number, sheetapprovalhistorykeyvalue14.text, sheetapprovalhistorykeyvalue14."time", sheetapprovalhistorykeyvalue14.timespan, sheetapprovalhistorykeyvalue14.daterange_startdate, sheetapprovalhistorykeyvalue14.daterange_enddate, sheetapprovalhistorykeyvalue14.daterange_relativedaterangeuri, sheetapprovalhistorykeyvalue14.daterange_relativedaterangeasofdate, sheetapprovalhistorykeyvalue14.workdayduration_decimalworkdays, sheetapprovalhistorykeyvalue14.workdayduration_workdays, sheetapprovalhistorykeyvalue14.workdayduration_hours, sheetapprovalhistorykeyvalue14.workdayduration_minutes
  • Index Cond: (tah.id = sheetapprovalhistorykeyvalue14.timesheetapprovalhistoryid)
  • Filter: (upper(sheetapprovalhistorykeyvalue14.key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-EFFECTIVE-USER'::text)
  • Rows Removed by Filter: 25
  • Buffers: shared hit=3721132
78. 0.066 0.121 ↓ 1.0 322 1

Hash (cost=9.20..9.20 rows=320 width=40) (actual time=0.121..0.121 rows=322 loops=1)

  • Output: cl.name, cl.id, cl.code
  • Buckets: 1024 Batches: 1 Memory Usage: 32kB
  • Buffers: shared hit=6
79. 0.055 0.055 ↓ 1.0 322 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".clients cl (cost=0.00..9.20 rows=320 width=40) (actual time=0.004..0.055 rows=322 loops=1)

  • Output: cl.name, cl.id, cl.code
  • Buffers: shared hit=6
80. 1,499.288 1,499.288 ↑ 1.0 1 749,644

Index Scan using project_pkey on "546dd0d1bd304cf883cf684215da2167".project pj (cost=0.29..0.30 rows=1 width=575) (actual time=0.002..0.002 rows=1 loops=749,644)

  • Output: pj.description, pj.name, pj.id, pj.code, pj.timeandexpenseentrytype
  • Index Cond: (at.projectid = pj.id)
  • Buffers: shared hit=2112602
81. 744.615 20,240.388 ↑ 5.0 1 749,644

Nested Loop (cost=1.85..2.23 rows=5 width=46) (actual time=0.025..0.027 rows=1 loops=749,644)

  • Output: dm_attendancetimeallocation_facts.id, br.name
  • Buffers: shared hit=18207566
82. 1,598.570 8,995.728 ↑ 1.0 1 749,644

Nested Loop (cost=1.56..1.81 rows=1 width=54) (actual time=0.011..0.012 rows=1 loops=749,644)

  • Output: dm_attendancetimeallocation_facts.userid, dm_attendancetimeallocation_facts.entrydate, dm_attendancetimeallocation_facts.id, br.name
  • Join Filter: ((dm_attendancetimeallocation_facts.entrydate >= pbrh.effectivedate) AND (dm_attendancetimeallocation_facts.entrydate <= pbrh.enddate))
  • Buffers: shared hit=10729800
83. 148.923 5,997.152 ↑ 1.0 1 749,644

Nested Loop (cost=1.13..1.33 rows=1 width=70) (actual time=0.008..0.008 rows=1 loops=749,644)

  • Output: dm_attendancetimeallocation_facts.userid, dm_attendancetimeallocation_facts.entrydate, dm_attendancetimeallocation_facts.id, br.name, pbr.id
  • Buffers: shared hit=7924703
84. 749.644 3,748.220 ↑ 1.0 1 749,644

Nested Loop (cost=0.70..0.83 rows=1 width=90) (actual time=0.005..0.005 rows=1 loops=749,644)

  • Output: dm_attendancetimeallocation_facts.billingrateid, dm_attendancetimeallocation_facts.projectid, dm_attendancetimeallocation_facts.userid, dm_attendancetimeallocation_facts.entrydate, dm_attendancetimeallocation_facts.id, br.name, br.id
  • Inner Unique: true
  • Buffers: shared hit=5110930
85. 2,248.932 2,248.932 ↑ 1.0 1 749,644

Index Scan using dm_attendancetimeallocation_facts_pkey on "546dd0d1bd304cf883cf684215da2167".dm_attendancetimeallocation_facts (cost=0.43..0.54 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=749,644)

  • Output: dm_attendancetimeallocation_facts.id, dm_attendancetimeallocation_facts.userid, dm_attendancetimeallocation_facts.entrydate, dm_attendancetimeallocation_facts.comments, dm_attendancetimeallocation_facts.duration, dm_attendancetimeallocation_facts.projectid, dm_attendancetimeallocation_facts.taskid, dm_attendancetimeallocation_facts.activityid, dm_attendancetimeallocation_facts.billingrateid, dm_attendancetimeallocation_facts.timeoffcodeid, dm_attendancetimeallocation_facts.breaktypeid, dm_attendancetimeallocation_facts.timesheetid, dm_attendancetimeallocation_facts.timeentryinfo1, dm_attendancetimeallocation_facts.timeentryinfo2, dm_attendancetimeallocation_facts.timeentryinfo3, dm_attendancetimeallocation_facts.timeentryinfo4, dm_attendancetimeallocation_facts.timeentryinfo5, dm_attendancetimeallocation_facts.timeoffinfo1, dm_attendancetimeallocation_facts.timeoffinfo2, dm_attendancetimeallocation_facts.timeoffinfo3, dm_attendancetimeallocation_facts.timeoffinfo4, dm_attendancetimeallocation_facts.timeoffinfo5, dm_attendancetimeallocation_facts.userspecifiedclientid, dm_attendancetimeallocation_facts.isbillable
  • Index Cond: (at.id = dm_attendancetimeallocation_facts.id)
  • Buffers: shared hit=3010921
86. 749.644 749.644 ↑ 1.0 1 749,644

Index Scan using billingrate_pkey on "546dd0d1bd304cf883cf684215da2167".billingrate br (cost=0.28..0.29 rows=1 width=46) (actual time=0.001..0.001 rows=1 loops=749,644)

  • Output: br.id, br.name, br.description, br.isenabled
  • Index Cond: (br.id = dm_attendancetimeallocation_facts.billingrateid)
  • Buffers: shared hit=2100009
87. 2,100.009 2,100.009 ↑ 1.0 1 700,003

Index Scan using ixpbr2projectid on "546dd0d1bd304cf883cf684215da2167".projectbillingrate pbr (cost=0.43..0.49 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=700,003)

  • Output: pbr.id, pbr.billingrateid, pbr.projectid, pbr.userid, pbr.isenabled
  • Index Cond: ((pbr.projectid = dm_attendancetimeallocation_facts.projectid) AND (pbr.billingrateid = dm_attendancetimeallocation_facts.billingrateid))
  • Filter: (((pbr.billingrateid = $3) AND (dm_attendancetimeallocation_facts.userid = pbr.userid)) OR ((pbr.billingrateid <> $4) AND (pbr.userid IS NULL)))
  • Buffers: shared hit=2813773
88. 1,400.006 1,400.006 ↑ 1.0 1 700,003

Index Scan using ixpbrhprojectbillingrateid on "546dd0d1bd304cf883cf684215da2167".projectbillingratehistory pbrh (cost=0.43..0.46 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=700,003)

  • Output: pbrh.id, pbrh.projectbillingrateid, pbrh.effectivedate, pbrh.enddate, pbrh.currencyid, pbrh.hourlyrate
  • Index Cond: (pbrh.projectbillingrateid = pbr.id)
  • Buffers: shared hit=2805097
89. 10,500.045 10,500.045 ↑ 2.0 1 700,003

Index Scan using uix2tsuseridstartdate on "546dd0d1bd304cf883cf684215da2167".timesheet dmvts (cost=0.29..0.40 rows=2 width=12) (actual time=0.015..0.015 rows=1 loops=700,003)

  • Output: dmvts.id, dmvts.userid, dmvts.startdate, dmvts.enddate, dmvts.approvalstatus, dmvts.duedate, dmvts.autosubmitdatetimeutc, dmvts.lastautosubmitattemptdatetimeutc, dmvts.createdonutc
  • Index Cond: ((dmvts.userid = dm_attendancetimeallocation_facts.userid) AND (dm_attendancetimeallocation_facts.entrydate >= dmvts.startdate))
  • Filter: (dm_attendancetimeallocation_facts.entrydate <= dmvts.enddate)
  • Rows Removed by Filter: 32
  • Buffers: shared hit=7477766
90. 3.260 19.542 ↓ 1.0 16,201 1

Hash (cost=1,147.58..1,147.58 rows=16,145 width=546) (actual time=19.542..19.542 rows=16,201 loops=1)

  • Output: tk.name, tk.id, tk.code, tk.description, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END)
  • Buckets: 16384 Batches: 1 Memory Usage: 1092kB
  • Buffers: shared hit=522
91. 2.265 16.282 ↓ 1.0 16,201 1

Hash Left Join (cost=569.19..1,147.58 rows=16,145 width=546) (actual time=6.078..16.282 rows=16,201 loops=1)

  • Output: tk.name, tk.id, tk.code, tk.description, (CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END)
  • Hash Cond: (tk.estimatedcostcurrencyid = exchangerate_1.fixedcurrencyid)
  • Buffers: shared hit=522
92. 5.981 13.977 ↓ 1.0 16,201 1

Hash Right Join (cost=567.00..1,084.84 rows=16,145 width=550) (actual time=6.023..13.977 rows=16,201 loops=1)

  • Output: tk.name, tk.id, tk.code, tk.description, tk.estimatedcostcurrencyid, CASE WHEN tdh.effectivelyenabled THEN 0 ELSE 1 END
  • Inner Unique: true
  • Hash Cond: (tdh.taskid = tk.id)
  • Buffers: shared hit=519
93. 2.045 2.045 ↓ 1.0 16,201 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".taskdenormalizedhierarchy tdh (cost=0.00..475.45 rows=16,145 width=5) (actual time=0.005..2.045 rows=16,201 loops=1)

  • Output: tdh.taskid, tdh.levelcount, tdh.closedcount, tdh.hierarchysorting, tdh.hierarchytaskname, tdh.level1, tdh.level2, tdh.level3, tdh.level4, tdh.level5, tdh.level6, tdh.level7, tdh.level8, tdh.level9, tdh.level10, tdh.fullpath, tdh.effectivelyenabled, tdh.effectivecloseddate
  • Buffers: shared hit=314
94. 2.880 5.951 ↓ 1.0 16,201 1

Hash (cost=365.89..365.89 rows=16,089 width=546) (actual time=5.951..5.951 rows=16,201 loops=1)

  • Output: tk.name, tk.id, tk.code, tk.description, tk.estimatedcostcurrencyid
  • Buckets: 16384 Batches: 1 Memory Usage: 1025kB
  • Buffers: shared hit=205
95. 3.071 3.071 ↓ 1.0 16,201 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".task tk (cost=0.00..365.89 rows=16,089 width=546) (actual time=0.005..3.071 rows=16,201 loops=1)

  • Output: tk.name, tk.id, tk.code, tk.description, tk.estimatedcostcurrencyid
  • Buffers: shared hit=205
96. 0.003 0.040 ↓ 7.0 7 1

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

  • Output: exchangerate_1.fixedcurrencyid
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
97. 0.037 0.037 ↓ 7.0 7 1

Index Scan using uix3er_currencyideffectivedate on "546dd0d1bd304cf883cf684215da2167".exchangerate exchangerate_1 (cost=0.14..2.17 rows=1 width=4) (actual time=0.032..0.037 rows=7 loops=1)

  • Output: exchangerate_1.fixedcurrencyid
  • Index Cond: ((exchangerate_1.variablecurrencyid = $2) AND (('now'::cstring)::date >= exchangerate_1.effectivedate))
  • Filter: (('now'::cstring)::date <= exchangerate_1.enddate)
  • Buffers: shared hit=3
98. 0.852 2.161 ↓ 1.0 4,438 1

Hash (cost=82.38..82.38 rows=4,298 width=38) (actual time=2.161..2.161 rows=4,438 loops=1)

  • Output: du.userid, dep.name, dep.code
  • Buckets: 8192 Batches: 1 Memory Usage: 367kB
  • Buffers: shared hit=26
99. 0.914 1.309 ↓ 1.0 4,438 1

Hash Join (cost=2.28..82.38 rows=4,298 width=38) (actual time=0.039..1.309 rows=4,438 loops=1)

  • Output: du.userid, dep.name, dep.code
  • Inner Unique: true
  • Hash Cond: (du.departmentid = dep.id)
  • Buffers: shared hit=26
100. 0.369 0.369 ↓ 1.0 4,438 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".departmentusers du (cost=0.00..67.98 rows=4,298 width=8) (actual time=0.006..0.369 rows=4,438 loops=1)

  • Output: du.departmentid, du.userid, du.isprimarydepartment
  • Buffers: shared hit=25
101. 0.015 0.026 ↑ 1.0 57 1

Hash (cost=1.57..1.57 rows=57 width=38) (actual time=0.026..0.026 rows=57 loops=1)

  • Output: dep.name, dep.code, dep.id
  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=1
102. 0.011 0.011 ↑ 1.0 57 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".departments dep (cost=0.00..1.57 rows=57 width=38) (actual time=0.004..0.011 rows=57 loops=1)

  • Output: dep.name, dep.code, dep.id
  • Buffers: shared hit=1
103. 749.644 749.644 ↑ 1.0 1 749,644

Index Only Scan using ix4ul_userlocationstartend on "546dd0d1bd304cf883cf684215da2167".userlocation userlocation22 (cost=0.28..0.31 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=749,644)

  • Output: userlocation22.userid, userlocation22.locationid, userlocation22.startdate, userlocation22.enddate
  • Index Cond: ((userlocation22.userid = ui.id) AND (userlocation22.startdate <= '2020-05-18'::date) AND (userlocation22.enddate >= '2020-05-18'::date))
  • Heap Fetches: 66687
  • Buffers: shared hit=1577167
104. 0.006 0.011 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=234) (actual time=0.011..0.011 rows=5 loops=1)

  • Output: location20.name, location20.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
105. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on "546dd0d1bd304cf883cf684215da2167".location location20 (cost=0.00..1.05 rows=5 width=234) (actual time=0.004..0.005 rows=5 loops=1)

  • Output: location20.name, location20.id
  • Buffers: shared hit=1
Planning time : 31.864 ms
Execution time : 102,832.001 ms