explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G2wD : phhny_before

Settings
# exclusive inclusive rows x rows loops node
1. 0.353 6,812,316.624 ↓ 63.3 190 1

Sort (cost=2,428,602.43..2,428,602.43 rows=3 width=1,293) (actual time=6,812,316.616..6,812,316.624 rows=190 loops=1)

  • Output: ((ui.lastname)::character varying(50)), ((ui.firstname)::character varying(50)), dmv_timesheetday_facts6.userduplicatename2, ((login.loginname)::character varying(255)), ((cl.name)::character varying(255)), dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1
  • Sort Key: ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", dmv_timesheetday_facts6.userduplicatename2, ((login.loginname)::character varying(255)) COLLATE "en_US", ((cl.name)::character varying(255)) COLLATE "en_US", dmv_timesheetday_facts6.timesheetenddate3
  • Sort Method: quicksort Memory: 52kB
  • Buffers: shared hit=38,555,211 read=78,532
2.          

CTE dmv_timesheetday_facts0cte

3. 0.497 6,812,279.670 ↓ 32.4 519 1

GroupAggregate (cost=2,428,573.69..2,428,574.21 rows=16 width=29) (actual time=6,812,279.056..6,812,279.670 rows=519 loops=1)

  • Output: sum((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)), ts.userid, ui_1.duplicatename, ((date_part('month'::text, (ts_1.enddate)::timestamp without time zone))::integer), (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END)
  • Group Key: ts.userid, ui_1.duplicatename, ((date_part('month'::text, (ts_1.enddate)::timestamp without time zone))::integer), (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END)
  • Buffers: shared hit=38,551,771 read=78,503
4. 1.494 6,812,279.173 ↓ 113.1 1,809 1

Sort (cost=2,428,573.69..2,428,573.73 rows=16 width=29) (actual time=6,812,279.042..6,812,279.173 rows=1,809 loops=1)

  • Output: ts.userid, ui_1.duplicatename, ((date_part('month'::text, (ts_1.enddate)::timestamp without time zone))::integer), (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid 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)
  • Sort Key: ts.userid, ui_1.duplicatename, ((date_part('month'::text, (ts_1.enddate)::timestamp without time zone))::integer), (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END)
  • Sort Method: quicksort Memory: 190kB
  • Buffers: shared hit=38,551,771 read=78,503
5. 142,465.473 6,812,277.679 ↓ 113.1 1,809 1

Nested Loop (cost=729.86..2,428,573.37 rows=16 width=29) (actual time=33,032.283..6,812,277.679 rows=1,809 loops=1)

  • Output: ts.userid, ui_1.duplicatename, (date_part('month'::text, (ts_1.enddate)::timestamp without time zone))::integer, (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid 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)
  • Join Filter: (ts.id = at.timesheetid)
  • Rows Removed by Join Filter: 1,101,807,711
  • Buffers: shared hit=38,551,771 read=78,503
6. 2.481 2,425.942 ↓ 504.0 504 1

Nested Loop (cost=25.57..2,171.29 rows=1 width=57) (actual time=7.354..2,425.942 rows=504 loops=1)

  • Output: ts.userid, ts.id, ui_1.duplicatename, ts_1.enddate, ts_1.id, tslist.timesheetid
  • Inner Unique: true
  • Join Filter: (ts.id = ts_1.id)
  • Buffers: shared hit=4,682 read=1,661
7. 2.414 1,945.669 ↓ 504.0 504 1

Nested Loop (cost=25.15..2,170.82 rows=1 width=37) (actual time=6.220..1,945.669 rows=504 loops=1)

  • Output: ts.userid, ts.id, ui_1.duplicatename, tslist.timesheetid
  • Inner Unique: true
  • Buffers: shared hit=3,029 read=1,312
8. 2.869 888.887 ↓ 504.0 504 1

Nested Loop (cost=24.73..2,168.39 rows=1 width=21) (actual time=1.091..888.887 rows=504 loops=1)

  • Output: ts.userid, ts.id, ui_1.duplicatename
  • Inner Unique: true
  • Buffers: shared hit=1,682 read=604
9. 815.958 815.962 ↓ 504.0 504 1

Index Scan using uix2tsuseridstartdate on phhnygen3.timesheet ts (cost=24.45..2,166.09 rows=1 width=20) (actual time=1.080..815.962 rows=504 loops=1)

  • Output: ts.id, ts.userid, ts.startdate, ts.enddate, ts.approvalstatus, ts.duedate, ts.autosubmitdatetimeutc, ts.lastautosubmitattemptdatetimeutc, ts.createdonutc
  • Index Cond: ((ts.startdate >= '2020-01-01'::date) AND (ts.startdate <= '2020-01-04'::date))
  • Filter: ((NOT (hashed SubPlan 1)) AND (ts.enddate >= '2020-01-01'::date) AND (ts.enddate <= '2020-01-04'::date))
  • Buffers: shared hit=211 read=563
10.          

SubPlan (for Index Scan)

11. 0.004 0.004 ↓ 0.0 0 1

Index Only Scan using ix4ud_userdivisionstartend on phhnygen3.userdivision userdivision4 (cost=0.15..23.71 rows=126 width=4) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: userdivision4.userid
  • Index Cond: ((userdivision4.startdate <= '2020-01-07'::date) AND (userdivision4.enddate >= '2020-01-07'::date))
  • Heap Fetches: 0
  • Buffers: shared hit=1
12. 70.056 70.056 ↑ 1.0 1 504

Index Scan using userinfo_pkey on phhnygen3.userinfo ui_1 (cost=0.28..2.29 rows=1 width=5) (actual time=0.139..0.139 rows=1 loops=504)

  • Output: ui_1.id, ui_1.firstname, ui_1.lastname, ui_1.email, ui_1.startdate, ui_1.enddate, ui_1.externalid, ui_1.disabled, ui_1.info1, ui_1.info2, ui_1.info3, ui_1.info4, ui_1.info5, ui_1.info6, ui_1.info7, ui_1.info8, ui_1.info9, ui_1.info10, ui_1.info11, ui_1.info12, ui_1.info13, ui_1.info14, ui_1.info15, ui_1.info16, ui_1.info17, ui_1.info18, ui_1.info19, ui_1.info20, ui_1.info21, ui_1.info22, ui_1.info23, ui_1.info24, ui_1.info25, ui_1.info26, ui_1.info27, ui_1.info28, ui_1.info29, ui_1.info30, ui_1.info31, ui_1.info32, ui_1.info33, ui_1.info34, ui_1.info35, ui_1.info36, ui_1.info37, ui_1.info38, ui_1.info39, ui_1.info40, ui_1.info41, ui_1.info42, ui_1.info43, ui_1.info44, ui_1.info45, ui_1.info46, ui_1.info47, ui_1.info48, ui_1.info49, ui_1.info50, ui_1.languageid, ui_1.employeetypeid, ui_1.timezoneid, ui_1.duplicatename, ui_1.issampleuser, ui_1.slug, ui_1.defaultactivityid, ui_1.displayname, ui_1.guidid
  • Index Cond: (ui_1.id = ts.userid)
  • Buffers: shared hit=1,471 read=41
13. 1,054.368 1,054.368 ↑ 1.0 1 504

Index Only Scan using ixdtslsftimesheetid on phhnygen3.dm_timesheetlist_facts tslist (cost=0.42..2.44 rows=1 width=16) (actual time=2.092..2.092 rows=1 loops=504)

  • Output: tslist.timesheetid
  • Index Cond: (tslist.timesheetid = ts.id)
  • Heap Fetches: 512
  • Buffers: shared hit=1,347 read=708
14. 477.792 477.792 ↑ 1.0 1 504

Index Scan using timesheet_pkey on phhnygen3.timesheet ts_1 (cost=0.42..0.45 rows=1 width=20) (actual time=0.948..0.948 rows=1 loops=504)

  • Output: ts_1.id, ts_1.userid, ts_1.startdate, ts_1.enddate, ts_1.approvalstatus, ts_1.duedate, ts_1.autosubmitdatetimeutc, ts_1.lastautosubmitattemptdatetimeutc, ts_1.createdonutc
  • Index Cond: (ts_1.id = tslist.timesheetid)
  • Buffers: shared hit=1,653 read=349
15. 4,782,900.486 6,667,386.264 ↑ 1.0 2,186,130 504

Hash Left Join (cost=704.30..2,377,067.06 rows=2,192,662 width=616) (actual time=0.209..13,228.941 rows=2,186,130 loops=504)

  • Output: NULL::uuid, NULL::integer, NULL::date, NULL::uuid, NULL::interval, NULL::text, CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END, NULL::date, NULL::integer, NULL::integer, NULL::integer, NULL::integer, 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, NULL::interval, NULL::interval, NULL::interval, CASE WHEN ((at.timeoffcodeid IS NULL) AND phhnygen3.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 phhnygen3.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) AND (at.userspecifiedclientid = pc_1.clientid))
  • Join Filter: ((at.entrydate >= pc_1.effectivedate) AND (at.entrydate <= pc_1.enddate))
  • Buffers: shared hit=38,547,089 read=76,842
16. 1,566,030.354 1,884,481.704 ↑ 1.0 2,186,130 504

Hash Left Join (cost=471.13..1,225,686.34 rows=2,192,662 width=105) (actual time=0.189..3,739.051 rows=2,186,130 loops=504)

  • Output: at.userspecifiedclientid, at.timeoffcodeid, at.breaktypeid, at.duration, at.isbillable, at.projectid, at.timesheetid, at.entrydate, pj.clientbillingallocationmethod, pc.clientid, ((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric))
  • Hash Cond: (at.projectid = pj.id)
  • Join Filter: ((at.entrydate >= pc.effectivedate) AND (at.entrydate <= pc.enddate))
  • Filter: (CASE WHEN (pj.clientbillingallocationmethod = 0) THEN pc.clientid ELSE at.userspecifiedclientid END = ANY ('{3,63,317,57,512,318,316,397,539,399,523,7,479,488,460,466,462,392,447,304,419,409,213,467,143,514,420,43,4,489,526,544,469,541,427,305,50,537,480,69,9,290,501,22,319,443,459,494,202,10,11,291,538,545,209,320,71,450,403,214,306,201,502,12,434,435,293,59,321,337,322,411,408,299,528,495,191,340,135,381,504,276,283,118,198,346,433,323,103,112,113,87,531,499,54,15,211,431,195,490,439,472,70,60,506,90,114,132,406,212,67,56,307,477,324,216,133,187,461,471,325,228,524,181,455,414,522,468,78,55,24,500,85,448,326,37,17,438,327,533,452,421,436,463,464,196,645,482,496,308,505,185,328,35,34,39,18,110,89,139,485,79,478,517,476,176,422,189,402,309,298,474,58,543,418,493,473,45,19,465,288,423,310,329,53,432,73,91,521,518,223,192,511,204,311,2,525,127,99,330,120,301,710,331,332,21,677,312,449,491,516,529,313,536,121,507,487,497,611,194,437,475,40,200,75,140,46,141,101,503,203,82,532,104,508,644,453,86,68,391,74,440,66,743,295,115,28,530,498,279,96,183,333,486,334,404,197,470,42,199,458,81,193,80,457,335,424,776,513,417,29,407,456,49,425,430,483,123,612,31,296,336,314,315,292,519,126,65,520,255,542,26,280,281,277,282,287,285,286,284,426,33,515,217,492,88,578,116,412,527,410,416,484,415,92,76,134,205,394,509}'::integer[]))
  • Rows Removed by Filter: 558,642
  • Buffers: shared hit=38,546,908 read=76,840
17. 318,366.720 318,366.720 ↓ 1.0 2,744,772 504

Seq Scan on phhnygen3.dm_attendancetimeallocation_facts at (cost=0.00..104,079.60 rows=2,744,560 width=65) (actual time=0.006..631.680 rows=2,744,772 loops=504)

  • Output: at.userspecifiedclientid, at.timeoffcodeid, at.breaktypeid, at.duration, at.isbillable, at.projectid, at.timesheetid, at.entrydate
  • Buffers: shared hit=38,546,904 read=76,632
18. 1.139 84.630 ↓ 1.0 4,923 1

Hash (cost=409.85..409.85 rows=4,903 width=52) (actual time=84.630..84.630 rows=4,923 loops=1)

  • Output: pj.clientbillingallocationmethod, pj.id, pc.clientid, pc.effectivedate, pc.enddate, ((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric))
  • Buckets: 8,192 Batches: 1 Memory Usage: 339kB
  • Buffers: shared hit=4 read=208
19. 1.283 83.491 ↓ 1.0 4,923 1

Hash Join (cost=292.66..409.85 rows=4,903 width=52) (actual time=20.538..83.491 rows=4,923 loops=1)

  • Output: pj.clientbillingallocationmethod, pj.id, pc.clientid, pc.effectivedate, pc.enddate, ((COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric))
  • Inner Unique: true
  • Hash Cond: (pc.projectid = pj.id)
  • Buffers: shared hit=4 read=208
20. 62.414 62.414 ↓ 1.0 4,924 1

Seq Scan on phhnygen3.projectclient pc (cost=0.00..104.30 rows=4,904 width=48) (actual time=0.712..62.414 rows=4,924 loops=1)

  • Output: pc.clientid, pc.projectid, pc.effectivedate, pc.enddate, (COALESCE(pc.costallocationpercentage, '100'::numeric) / '100'::numeric)
  • Buffers: shared hit=3 read=40
21. 0.873 19.794 ↑ 1.0 4,945 1

Hash (cost=230.84..230.84 rows=4,946 width=8) (actual time=19.794..19.794 rows=4,945 loops=1)

  • Output: pj.clientbillingallocationmethod, pj.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 258kB
  • Buffers: shared hit=1 read=168
22. 18.921 18.921 ↑ 1.0 4,945 1

Seq Scan on phhnygen3.project pj (cost=0.00..230.84 rows=4,946 width=8) (actual time=1.208..18.921 rows=4,945 loops=1)

  • Output: pj.clientbillingallocationmethod, pj.id
  • Filter: (pj.clientbillingallocationmethod = 0)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1 read=168
23. 0.008 4.074 ↑ 1.0 1 1

Hash (cost=233.15..233.15 rows=1 width=16) (actual time=4.073..4.074 rows=1 loops=1)

  • Output: pj_1.id, pc_1.effectivedate, pc_1.enddate, pc_1.clientid
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=171 read=2
24. 0.004 4.066 ↑ 1.0 1 1

Nested Loop (cost=0.28..233.15 rows=1 width=16) (actual time=3.995..4.066 rows=1 loops=1)

  • Output: pj_1.id, pc_1.effectivedate, pc_1.enddate, pc_1.clientid
  • Buffers: shared hit=171 read=2
25. 1.537 1.537 ↑ 1.0 1 1

Seq Scan on phhnygen3.project pj_1 (cost=0.00..230.84 rows=1 width=4) (actual time=1.468..1.537 rows=1 loops=1)

  • Output: pj_1.id, pj_1.timeentrycappercent, pj_1.info1, pj_1.info2, pj_1.info3, pj_1.info4, pj_1.info5, pj_1.info6, pj_1.info7, pj_1.info8, pj_1.info9, pj_1.info10, pj_1.info11, pj_1.info12, pj_1.info13, pj_1.info14, pj_1.info15, pj_1.info16, pj_1.info17, pj_1.info18, pj_1.info19, pj_1.info20, pj_1.name, pj_1.slug, pj_1.code, pj_1.clientid, pj_1.projectleaderapproverid, pj_1.isprojectleaderapprovalrequired, pj_1.startdate, pj_1.enddate, pj_1.programid, pj_1.billingtype, pj_1.fixedbidamount, pj_1.fixedbidcurrencyid, pj_1.fixedbidfrequency, pj_1.costtype, pj_1.description, pj_1.percentcomplete, pj_1.istimeentryallowed, pj_1.estimatedhours, pj_1.estimatedexpenses, pj_1.estimatedexpensescurrencyid, pj_1.estimatedcost, pj_1.estimatedcostcurrencyid, pj_1.timeandexpenseentrytype, pj_1.estimationmode, pj_1.projectstatuslabelid, pj_1.billingratefrequencyid, pj_1.billingratefrequencyduration, pj_1.defaultbillingcurrencyid, pj_1.clientbillingallocationmethod, pj_1.billingcontractid, pj_1.guidid, pj_1.totalestimatedcontractamount, pj_1.totalestimatedcontractcurrencyid, pj_1.budgetedhours, pj_1.budgetedcost, pj_1.budgetedcostcurrencyid, pj_1.projecthealthstateid, pj_1.projecthealthstatedescription
  • Filter: (pj_1.clientbillingallocationmethod = 1)
  • Rows Removed by Filter: 4,945
  • Buffers: shared hit=169
26. 2.525 2.525 ↑ 1.0 1 1

Index Only Scan using uix4pc_projectclienteffectiveend on phhnygen3.projectclient pc_1 (cost=0.28..2.30 rows=1 width=16) (actual time=2.523..2.525 rows=1 loops=1)

  • Output: pc_1.projectid, pc_1.clientid, pc_1.effectivedate, pc_1.enddate
  • Index Cond: (pc_1.projectid = pj_1.id)
  • Heap Fetches: 1
  • Buffers: shared hit=2 read=2
27. 0.196 6,812,316.271 ↓ 63.3 190 1

Nested Loop (cost=1.25..28.19 rows=3 width=1,293) (actual time=6,812,281.092..6,812,316.271 rows=190 loops=1)

  • Output: ui.lastname, ui.firstname, dmv_timesheetday_facts6.userduplicatename2, login.loginname, cl.name, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1
  • Inner Unique: true
  • Buffers: shared hit=38,555,200 read=78,532
28. 0.055 6,812,314.935 ↓ 63.3 190 1

Nested Loop Left Join (cost=1.10..27.70 rows=3 width=84) (actual time=6,812,280.018..6,812,314.935 rows=190 loops=1)

  • Output: dmv_timesheetday_facts6.userduplicatename2, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1, ui.lastname, ui.firstname, login.loginname, cl.name, du.departmentid
  • Inner Unique: true
  • Buffers: shared hit=38,555,010 read=78,531
29. 0.058 6,812,313.360 ↓ 63.3 190 1

Nested Loop (cost=0.83..24.38 rows=3 width=74) (actual time=6,812,280.006..6,812,313.360 rows=190 loops=1)

  • Output: dmv_timesheetday_facts6.userduplicatename2, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1, dmv_timesheetday_facts6.clientid4, ui.lastname, ui.firstname, login.loginname, du.departmentid
  • Inner Unique: true
  • Join Filter: (dmv_timesheetday_facts6.userid1 = login.userid)
  • Buffers: shared hit=38,554,441 read=78,530
30. 0.085 6,812,291.072 ↓ 63.3 190 1

Nested Loop (cost=0.56..23.38 rows=3 width=54) (actual time=6,812,279.994..6,812,291.072 rows=190 loops=1)

  • Output: dmv_timesheetday_facts6.userduplicatename2, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1, dmv_timesheetday_facts6.clientid4, ui.lastname, ui.firstname, ui.id, du.departmentid, du.userid
  • Inner Unique: true
  • Join Filter: (dmv_timesheetday_facts6.userid1 = ui.id)
  • Buffers: shared hit=38,553,889 read=78,512
31. 0.382 6,812,290.607 ↓ 47.5 190 1

Nested Loop (cost=0.28..21.56 rows=4 width=37) (actual time=6,812,279.980..6,812,290.607 rows=190 loops=1)

  • Output: dmv_timesheetday_facts6.userduplicatename2, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1, dmv_timesheetday_facts6.clientid4, du.departmentid, du.userid
  • Buffers: shared hit=38,553,319 read=78,512
32. 6,812,279.845 6,812,279.845 ↓ 32.4 519 1

CTE Scan on dmv_timesheetday_facts0cte dmv_timesheetday_facts6 (cost=0.00..0.32 rows=16 width=29) (actual time=6,812,279.059..6,812,279.845 rows=519 loops=1)

  • Output: dmv_timesheetday_facts6.durationworked0, dmv_timesheetday_facts6.userid1, dmv_timesheetday_facts6.userduplicatename2, dmv_timesheetday_facts6.timesheetenddate3, dmv_timesheetday_facts6.clientid4
  • Buffers: shared hit=38,551,771 read=78,503
33. 10.380 10.380 ↓ 0.0 0 519

Index Scan using ixduuserid on phhnygen3.departmentusers du (cost=0.28..1.32 rows=1 width=8) (actual time=0.020..0.020 rows=0 loops=519)

  • Output: du.departmentid, du.userid, du.isprimarydepartment
  • Index Cond: (du.userid = dmv_timesheetday_facts6.userid1)
  • Filter: (du.departmentid = ANY ('{4,24,19,20,21,22,23,25,91,3,18,12,13,14,15,16,17,114}'::integer[]))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1,548 read=9
34. 0.380 0.380 ↑ 1.0 1 190

Index Scan using userinfo_pkey on phhnygen3.userinfo ui (cost=0.28..0.44 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=190)

  • Output: ui.id, ui.firstname, ui.lastname, ui.email, ui.startdate, ui.enddate, ui.externalid, ui.disabled, ui.info1, ui.info2, ui.info3, ui.info4, ui.info5, ui.info6, ui.info7, ui.info8, ui.info9, ui.info10, ui.info11, ui.info12, ui.info13, ui.info14, ui.info15, ui.info16, ui.info17, ui.info18, ui.info19, ui.info20, ui.info21, ui.info22, ui.info23, ui.info24, ui.info25, ui.info26, ui.info27, ui.info28, ui.info29, ui.info30, ui.info31, ui.info32, ui.info33, ui.info34, ui.info35, ui.info36, ui.info37, ui.info38, ui.info39, ui.info40, ui.info41, ui.info42, ui.info43, ui.info44, ui.info45, ui.info46, ui.info47, ui.info48, ui.info49, ui.info50, ui.languageid, ui.employeetypeid, ui.timezoneid, ui.duplicatename, ui.issampleuser, ui.slug, ui.defaultactivityid, ui.displayname, ui.guidid
  • Index Cond: (ui.id = du.userid)
  • Buffers: shared hit=570
35. 22.230 22.230 ↑ 1.0 1 190

Index Scan using login_pkey on phhnygen3.login (cost=0.28..0.32 rows=1 width=32) (actual time=0.117..0.117 rows=1 loops=190)

  • Output: login.userid, login.loginname, login.password, login.accountexpiry, login.passwordlastchanged, login.forcepasswordchange, login.disablepasswordchange, login.info1, login.info2, login.info3, login.info4, login.info5, login.passwordentropybits, login.ssoname, login.invalidloginattempts, login.lastinvalidloginattemptutc
  • Index Cond: (login.userid = ui.id)
  • Buffers: shared hit=552 read=18
36. 1.520 1.520 ↑ 1.0 1 190

Index Scan using clients_pkey on phhnygen3.clients cl (cost=0.27..1.10 rows=1 width=18) (actual time=0.008..0.008 rows=1 loops=190)

  • Output: cl.id, cl.name, cl.code, cl.comments, cl.disabled, cl.city, cl.stateprovince, cl.zippostalcode, cl.telephone, cl.fax, cl.website, cl.info1, cl.info2, cl.info3, cl.info4, cl.info5, cl.info6, cl.info7, cl.info8, cl.info9, cl.info10, cl.info11, cl.info12, cl.slug, cl.clientmanageruserid, cl.address, cl.country, cl.email, cl.billingcontact, cl.billingaddress, cl.billingcity, cl.billingstateprovince, cl.billingzippostalcode, cl.billingcountry, cl.billingemail, cl.billingtelephone, cl.billingfax, cl.billingwebsite, cl.defaultbillingcurrencyid, cl.guidid
  • Index Cond: (dmv_timesheetday_facts6.clientid4 = cl.id)
  • Buffers: shared hit=569 read=1
37. 1.140 1.140 ↑ 1.0 1 190

Index Only Scan using departments_pkey on phhnygen3.departments dep (cost=0.14..0.17 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=190)

  • Output: dep.id
  • Index Cond: (dep.id = du.departmentid)
  • Heap Fetches: 0
  • Buffers: shared hit=190 read=1
Planning time : 221.381 ms
Execution time : 6,812,317.247 ms