explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GIxO : NEcaustrial01 after index 2

Settings
# exclusive inclusive rows x rows loops node
1. 0.155 7,842.174 ↓ 3.8 23 1

Sort (cost=832,946.60..832,946.62 rows=6 width=369) (actual time=7,842.168..7,842.174 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=175289
2.          

Initplan (forSort)

3. 0.003 0.003 ↑ 1.0 1 1

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

  • Buffers: shared hit=1
4. 0.051 7,842.016 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,859.48..832,945.52 rows=6 width=369) (actual time=7,561.525..7,842.016 rows=23 loops=1)

  • Buffers: shared hit=175289
5. 0.039 7,841.804 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,858.79..832,923.05 rows=6 width=314) (actual time=7,561.510..7,841.804 rows=23 loops=1)

  • Buffers: shared hit=175162
6. 0.033 7,841.535 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,858.11..832,906.76 rows=6 width=243) (actual time=7,561.486..7,841.535 rows=23 loops=1)

  • Buffers: shared hit=175046
7. 0.051 7,841.410 ↓ 3.8 23 1

Hash Join (cost=78,857.54..832,902.83 rows=6 width=230) (actual time=7,561.460..7,841.410 rows=23 loops=1)

  • Hash Cond: (ts.userid = du.userid)
  • Buffers: shared hit=174993
8. 0.032 7,838.888 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,755.12..832,800.33 rows=6 width=229) (actual time=7,558.961..7,838.888 rows=23 loops=1)

  • Buffers: shared hit=174978
9. 0.038 7,838.856 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.99..832,799.39 rows=6 width=214) (actual time=7,558.958..7,838.856 rows=23 loops=1)

  • Buffers: shared hit=174978
10. 0.054 7,838.818 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.71..832,797.48 rows=6 width=203) (actual time=7,558.953..7,838.818 rows=23 loops=1)

  • Buffers: shared hit=174978
11. 0.048 7,838.741 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,754.42..832,795.59 rows=6 width=203) (actual time=7,558.944..7,838.741 rows=23 loops=1)

  • Buffers: shared hit=174913
12. 362.811 7,838.601 ↓ 3.8 23 1

Hash Join (cost=78,754.14..832,793.22 rows=6 width=192) (actual time=7,558.928..7,838.601 rows=23 loops=1)

  • Hash Cond: (at.timesheetid = ts_1.id)
  • Buffers: shared hit=174844
13. 4,411.868 7,325.492 ↓ 1.0 1,012,180 1

Hash Left Join (cost=49,215.07..789,341.51 rows=1,011,823 width=129) (actual time=881.922..7,325.492 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=148895
14. 491.396 2,867.571 ↓ 1.0 1,012,180 1

Hash Left Join (cost=47,094.64..238,067.15 rows=1,011,823 width=89) (actual time=835.687..2,867.571 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=148057
15. 1,020.805 2,369.447 ↓ 1.0 1,012,180 1

Hash Right Join (cost=46,167.57..229,551.39 rows=1,011,823 width=89) (actual time=828.943..2,369.447 rows=1,012,180 loops=1)

  • Hash Cond: (isbillable.factid = at.id)
  • Buffers: shared hit=147394
16. 523.418 523.418 ↓ 1.0 944,195 1

Index Scan using testdba1 on dm_attendancetimeallocation_metadata isbillable (cost=0.56..170,414.47 rows=943,266 width=17) (actual time=0.037..523.418 rows=944,195 loops=1)

  • Index Cond: (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:IS-BILLABLE'::text)
  • Buffers: shared hit=123993
17. 447.797 825.224 ↓ 1.0 1,012,180 1

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

  • Buckets: 1048576 Batches: 1 Memory Usage: 110996kB
  • Buffers: shared hit=23401
18. 377.427 377.427 ↓ 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..377.427 rows=1,012,180 loops=1)

  • Buffers: shared hit=23401
19. 0.001 6.728 ↓ 0.0 0 1

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

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

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

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

Seq Scan on project pj_2 (cost=0.00..924.74 rows=1 width=4) (actual time=6.726..6.726 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.122 46.053 ↑ 1.0 20,937 1

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

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

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

  • Hash Cond: (pj_1.id = pc.projectid)
  • Buffers: shared hit=838
25. 9.692 9.692 ↑ 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.692 rows=20,939 loops=1)

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

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

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

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

  • Buffers: shared hit=175
28. 0.013 150.298 ↓ 3.0 3 1

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=25100
33. 0.009 138.433 ↓ 3.0 3 1

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

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

Nested Loop (cost=1.26..29,037.47 rows=1 width=80) (actual time=0.140..138.409 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.004 (...)
35. 0.015 138.372 ↓ 5.0 5 1

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

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

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.42..29,034.55 rows=1 width=48) (actual time=0.107..138.280 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.077 0.077 ↑ 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.007..0.011 rows=1 loops=7)

  • Index Cond: (timesheetid = tah.timesheetid)
  • Filter: (timesheetstatus = 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=134
38. 0.015 0.015 ↑ 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.005 rows=1 loops=3)

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

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

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

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

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

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

  • Buffers: shared hit=147
42. 3.504 3.504 ↓ 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.168 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.023 0.023 ↑ 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.001 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.730 2.471 ↓ 1.0 2,423 1

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

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

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

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

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

  • Buffers: shared hit=14
50. 0.004 0.008 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=9) (actual time=0.008..0.008 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.056 0.092 ↑ 1.0 1 23

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

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

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

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

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

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

Index Scan using testdba2 on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue8 (cost=0.69..2.70 rows=1 width=87) (actual time=0.010..0.010 rows=0 loops=23)

  • Index Cond: ((tah.id = timesheetapprovalhistoryid) AND (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-ACTUAL-USER'::text))
  • Buffers: shared hit=116
56. 0.161 0.161 ↑ 2.0 1 23

Index Scan using testdba2 on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.69..3.72 rows=2 width=87) (actual time=0.007..0.007 rows=1 loops=23)

  • Index Cond: ((tah.id = timesheetapprovalhistoryid) AND (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-EFFECTIVE-USER'::text))
  • Buffers: shared hit=127