explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p7IM : NEcaustrial01

Settings
# exclusive inclusive rows x rows loops node
1. 0.152 12,771.720 ↓ 3.8 23 1

Sort (cost=874,316.46..874,316.48 rows=6 width=371) (actual time=12,771.716..12,771.720 rows=23 loops=1)

  • Sort Key: ((ui.info1)::character varying(255)) COLLATE "en_US", ((login.loginname)::character varying(255)) COLLATE "en_US", ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", ui.duplicatename (...)
  • Sort Method: quicksort Memory: 34kB
  • Buffers: shared hit=51795 read=149741
2.          

Initplan (forSort)

3. 0.004 0.004 ↑ 1.0 1 1

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

  • Buffers: shared hit=1
4. 0.047 12,771.564 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,858.67..874,315.38 rows=6 width=371) (actual time=12,297.636..12,771.564 rows=23 loops=1)

  • Buffers: shared hit=51795 read=149741
5. 0.036 12,770.827 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,858.11..873,422.05 rows=6 width=315) (actual time=12,297.590..12,770.827 rows=23 loops=1)

  • Buffers: shared hit=51588 read=149741
6. 0.035 12,769.963 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,857.55..872,528.90 rows=6 width=243) (actual time=12,297.527..12,769.963 rows=23 loops=1)

  • Buffers: shared hit=51381 read=149741
7. 0.050 12,769.836 ↓ 3.8 23 1

Hash Join (cost=78,856.98..872,524.97 rows=6 width=230) (actual time=12,297.500..12,769.836 rows=23 loops=1)

  • Hash Cond: (ts.userid = du.userid)
  • Buffers: shared hit=51328 read=149741
8. 0.034 12,767.371 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.56..872,422.47 rows=6 width=229) (actual time=12,295.057..12,767.371 rows=23 loops=1)

  • Buffers: shared hit=51313 read=149741
9. 0.031 12,767.337 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.43..872,421.53 rows=6 width=214) (actual time=12,295.054..12,767.337 rows=23 loops=1)

  • Buffers: shared hit=51313 read=149741
10. 0.026 12,767.306 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.15..872,419.62 rows=6 width=203) (actual time=12,295.051..12,767.306 rows=23 loops=1)

  • Buffers: shared hit=51313 read=149741
11. 0.049 12,767.234 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,753.87..872,417.73 rows=6 width=203) (actual time=12,295.041..12,767.234 rows=23 loops=1)

  • Buffers: shared hit=51248 read=149741
12. 371.299 12,767.093 ↓ 3.8 23 1

Hash Join (cost=78,753.59..872,415.36 rows=6 width=192) (actual time=12,295.023..12,767.093 rows=23 loops=1)

  • Hash Cond: (at.timesheetid = ts_1.id)
  • Buffers: shared hit=51179 read=149741
13. 4,365.757 12,241.789 ↓ 1.0 1,012,180 1

Hash Left Join (cost=49,214.51..828,963.65 rows=1,011,823 width=129) (actual time=877.811..12,241.789 rows=1,012,180 loops=1)

  • Hash Cond: (at.projectid = pj_1.id)
  • Join Filter: ((at.entrydate >= pc.effectivedate) AND (at.entrydate <= pc.enddate))
  • Buffers: shared hit=25230 read=149741
14. 497.612 7,830.350 ↓ 1.0 1,012,180 1

Hash Left Join (cost=47,094.08..277,689.29 rows=1,011,823 width=89) (actual time=831.941..7,830.350 rows=1,012,180 loops=1)

  • 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=24392 read=149741
15. 958.097 7,326.220 ↓ 1.0 1,012,180 1

Hash Right Join (cost=46,167.02..269,173.53 rows=1,011,823 width=89) (actual time=825.408..7,326.220 rows=1,012,180 loops=1)

  • Hash Cond: (isbillable.factid = at.id)
  • Buffers: shared hit=23729 read=149741
16. 5,546.299 5,546.299 ↓ 39.0 944,195 1

Seq Scan on dm_attendancetimeallocation_metadata isbillable (cost=0.00..222,673.74 rows=24,202 width=17) (actual time=0.054..5,546.299 rows=944,195 loops=1)

  • Filter: (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:IS-BILLABLE'::text)
  • Rows Removed by Filter: 3928992
  • Buffers: shared hit=328 read=149741
17. 448.318 821.824 ↓ 1.0 1,012,180 1

Hash (cost=33,519.23..33,519.23 rows=1,011,823 width=88) (actual time=821.824..821.824 rows=1,012,180 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 110996kB
  • Buffers: shared hit=23401
18. 373.506 373.506 ↓ 1.0 1,012,180 1

Seq Scan on dm_attendancetimeallocation_facts at (cost=0.00..33,519.23 rows=1,011,823 width=88) (actual time=0.006..373.506 rows=1,012,180 loops=1)

  • Buffers: shared hit=23401
19. 0.000 6.518 ↓ 0.0 0 1

Hash (cost=927.05..927.05 rows=1 width=16) (actual time=6.518..6.518 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=663
20. 0.002 6.518 ↓ 0.0 0 1

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

  • Buffers: shared hit=663
21. 6.516 6.516 ↓ 0.0 0 1

Seq Scan on project pj_2 (cost=0.00..924.74 rows=1 width=4) (actual time=6.516..6.516 rows=0 loops=1)

  • Filter: (clientbillingallocationmethod = 1)
  • Rows Removed by Filter: 20939
  • Buffers: shared hit=663
22. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (projectid = pj_2.id)
  • Heap Fetches: 0
23. 7.061 45.682 ↑ 1.0 20,937 1

Hash (cost=1,858.71..1,858.71 rows=20,937 width=52) (actual time=45.682..45.682 rows=20,937 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1422kB
  • Buffers: shared hit=838
24. 11.425 38.621 ↑ 1.0 20,937 1

Hash Join (cost=646.08..1,858.71 rows=20,937 width=52) (actual time=17.725..38.621 rows=20,937 loops=1)

  • Hash Cond: (pj_1.id = pc.projectid)
  • Buffers: shared hit=838
25. 9.608 9.608 ↑ 1.0 20,939 1

Seq Scan on project pj_1 (cost=0.00..924.74 rows=20,939 width=8) (actual time=0.006..9.608 rows=20,939 loops=1)

  • Filter: (clientbillingallocationmethod = 0)
  • Buffers: shared hit=663
26. 6.788 17.588 ↑ 1.0 20,937 1

Hash (cost=384.37..384.37 rows=20,937 width=48) (actual time=17.588..17.588 rows=20,937 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1340kB
  • Buffers: shared hit=175
27. 10.800 10.800 ↑ 1.0 20,937 1

Seq Scan on projectclient pc (cost=0.00..384.37 rows=20,937 width=48) (actual time=0.012..10.800 rows=20,937 loops=1)

  • Buffers: shared hit=175
28. 0.010 154.005 ↓ 3.0 3 1

Hash (cost=29,539.06..29,539.06 rows=1 width=172) (actual time=154.005..154.005 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=25949
29. 1.440 153.995 ↓ 3.0 3 1

Nested Loop Left Join (cost=2.10..29,539.06 rows=1 width=172) (actual time=2.437..153.995 rows=3 loops=1)

  • Join Filter: (ui.id = userhierarchy13.userid)
  • Rows Removed by Join Filter: 7164
  • Buffers: shared hit=25949
30. 1.558 149.129 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,389.82 rows=1 width=168) (actual time=0.804..149.129 rows=3 loops=1)

  • Join Filter: (ts.userid = login.userid)
  • Rows Removed by Join Filter: 7266
  • Buffers: shared hit=25829
31. 1.639 146.002 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,286.62 rows=1 width=151) (actual time=0.795..146.002 rows=3 loops=1)

  • Join Filter: (ts.userid = ui.id)
  • Rows Removed by Join Filter: 7266
  • Buffers: shared hit=25682
32. 0.005 142.287 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,038.41 rows=1 width=124) (actual time=0.174..142.287 rows=3 loops=1)

  • Buffers: shared hit=25100
33. 0.010 142.273 ↓ 3.0 3 1

Nested Loop (cost=1.68..29,037.95 rows=1 width=104) (actual time=0.171..142.273 rows=3 loops=1)

  • Join Filter: (tslist.timesheetid = ts_1.id)
  • Buffers: shared hit=25088
34. 0.038 142.245 ↓ 3.0 3 1

Nested Loop (cost=1.26..29,037.47 rows=1 width=80) (actual time=0.160..142.245 rows=3 loops=1)

  • Join Filter: (tah.serialnumber > tahls.lastsubmitserialnumber)
  • Rows Removed by Join Filter: 2
  • Buffers: shared hit=25076
  • -> Index Scan using timesheetapprovalhistorylastsubmit_pkey on timesheetapprovalhistorylastsubmit tahls (cost=0.42..0.46 rows=1 width=20) (actual time=0.005 (...)
35. 0.018 142.207 ↓ 5.0 5 1

Nested Loop (cost=0.84..29,037.00 rows=1 width=68) (actual time=0.151..142.207 rows=5 loops=1)

  • Buffers: shared hit=25056
  • Index Cond: (timesheetid = tslist.timesheetid)
  • Buffers: shared hit=20
36. 142.105 142.105 ↓ 7.0 7 1

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.42..29,034.55 rows=1 width=48) (actual time=0.125..142.105 rows=7 loops=1)

  • Index Cond: (action = ANY ('{2,3,6}'::integer[]))
  • Filter: (((systemprocessidentifier IS NULL) OR (systemprocessidentifier <> 'urn:replicon:approval-system-process:timesheet-submit-script-data-and- (...)
  • Rows Removed by Filter: 459240
  • Buffers: shared hit=24922
37. 0.084 0.084 ↑ 1.0 1 7

Index Scan using ixdtslsftimesheetid on dm_timesheetlist_facts tslist (cost=0.42..2.44 rows=1 width=20) (actual time=0.008..0.012 rows=1 loops=7)

  • Index Cond: (timesheetid = tah.timesheetid)
  • Filter: (timesheetstatus = 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=134
38. 0.018 0.018 ↑ 1.0 1 3

Index Scan using timesheet_pkey on timesheet ts_1 (cost=0.42..0.46 rows=1 width=24) (actual time=0.005..0.006 rows=1 loops=3)

  • Index Cond: (id = tahls.timesheetid)
  • Buffers: shared hit=12
39. 0.009 0.009 ↑ 1.0 1 3

Index Scan using timesheet_pkey on timesheet ts (cost=0.42..0.46 rows=1 width=20) (actual time=0.002..0.003 rows=1 loops=3)

  • Index Cond: (id = ts_1.id)
  • Buffers: shared hit=12
40. 2.076 2.076 ↓ 1.0 2,423 3

Seq Scan on userinfo ui (cost=0.00..218.09 rows=2,409 width=27) (actual time=0.003..0.692 rows=2,423 loops=3)

  • Buffers: shared hit=582
41. 1.569 1.569 ↓ 1.0 2,423 3

Seq Scan on login (cost=0.00..73.09 rows=2,409 width=17) (actual time=0.002..0.523 rows=2,423 loops=3)

  • Buffers: shared hit=147
42. 3.426 3.426 ↓ 1.0 2,389 3

Seq Scan on userhierarchy userhierarchy13 (cost=0.00..119.55 rows=2,376 width=8) (actual time=0.005..1.142 rows=2,389 loops=3)

  • Filter: (('2019-03-12'::date >= startdate) AND ('2019-03-12'::date <= enddate))
  • Rows Removed by Filter: 2927
  • Buffers: shared hit=120
43. 0.092 0.092 ↑ 1.0 1 23

Index Scan using userinfo_pkey on userinfo userinfo2 (cost=0.28..0.39 rows=1 width=19) (actual time=0.004..0.004 rows=1 loops=23)

  • Index Cond: (userhierarchy13.supervisorid = id)
  • Buffers: shared hit=69
44. 0.046 0.046 ↑ 1.0 1 23

Index Scan using project_pkey on project pj (cost=0.29..0.31 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=23)

  • Index Cond: (at.projectid = id)
  • Buffers: shared hit=65
45. 0.000 0.000 ↓ 0.0 0 23

Index Scan using userinfo_pkey on userinfo userinfo3 (cost=0.28..0.31 rows=1 width=19) (actual time=0.000..0.000 rows=0 loops=23)

  • Index Cond: (pj.projectleaderapproverid = id)
46. 0.000 0.000 ↓ 0.0 0 23

Index Scan using activities_pkey on activities activities4 (cost=0.13..0.15 rows=1 width=23) (actual time=0.000..0.000 rows=0 loops=23)

  • Index Cond: (at.activityid = id)
47. 0.664 2.415 ↓ 1.0 2,423 1

Hash (cost=72.30..72.30 rows=2,409 width=9) (actual time=2.415..2.415 rows=2,423 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 125kB
  • Buffers: shared hit=15
48. 1.193 1.751 ↓ 1.0 2,423 1

Hash Join (cost=1.09..72.30 rows=2,409 width=9) (actual time=0.023..1.751 rows=2,423 loops=1)

  • Hash Cond: (du.departmentid = dep.id)
  • Buffers: shared hit=15
49. 0.549 0.549 ↓ 1.0 2,423 1

Seq Scan on departmentusers du (cost=0.00..38.09 rows=2,409 width=8) (actual time=0.006..0.549 rows=2,423 loops=1)

  • Buffers: shared hit=14
50. 0.005 0.009 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=9) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
51. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on departments dep (cost=0.00..1.04 rows=4 width=9) (actual time=0.001..0.004 rows=4 loops=1)

  • Buffers: shared hit=1
52. 0.046 0.092 ↑ 1.0 1 23

Nested Loop Left Join (cost=0.57..0.64 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=23)

  • Buffers: shared hit=53
53. 0.046 0.046 ↑ 1.0 1 23

Index Scan using task_pkey on task tk (cost=0.42..0.46 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (at.taskid = id)
  • Buffers: shared hit=52
54. 0.000 0.000 ↓ 0.0 0 13

Index Scan using uix3er_currencyideffectivedate on exchangerate (cost=0.14..0.18 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: ((variablecurrencyid = $0) AND (tk.estimatedcostcurrencyid = fixedcurrencyid) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
55. 0.828 0.828 ↓ 0.0 0 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue8 (cost=0.56..148.80 rows=6 width=88) (actual time=0.036..0.036 rows=0 loops=23)

  • Index Cond: (tah.id = timesheetapprovalhistoryid)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-ACTUAL-USER'::text)
  • Rows Removed by Filter: 19
  • Buffers: shared hit=207
56. 0.690 0.690 ↑ 9.0 1 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.56..148.80 rows=9 width=88) (actual time=0.030..0.030 rows=1 loops=23)

  • Index Cond: (tah.id = timesheetapprovalhistoryid)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-EFFECTIVE-USER'::text)
  • Rows Removed by Filter: 18
  • Buffers: shared hit=207