explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AFgY : NEcaustrial01 after index 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.151 7,677.554 ↓ 3.8 23 1

Sort (cost=834,694.32..834,694.34 rows=6 width=371) (actual time=7,677.546..7,677.554 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=175460
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.004..0.004 rows=1 loops=1)

  • Buffers: shared hit=1
4. 0.057 7,677.399 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,859.23..834,693.23 rows=6 width=371) (actual time=7,399.139..7,677.399 rows=23 loops=1)

  • Buffers: shared hit=175460
5. 0.017 7,676.652 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,858.67..833,799.90 rows=6 width=315) (actual time=7,399.089..7,676.652 rows=23 loops=1)

  • Buffers: shared hit=175253
6. 0.032 7,675.853 ↓ 3.8 23 1

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

  • Buffers: shared hit=175046
7. 0.050 7,675.729 ↓ 3.8 23 1

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

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

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

  • Buffers: shared hit=174978
9. 0.032 7,673.198 ↓ 3.8 23 1

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

  • Buffers: shared hit=174978
10. 0.026 7,673.166 ↓ 3.8 23 1

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

  • Buffers: shared hit=174978
11. 0.054 7,673.094 ↓ 3.8 23 1

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

  • Buffers: shared hit=174913
12. 340.047 7,672.971 ↓ 3.8 23 1

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

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

Hash Left Join (cost=49,215.07..789,341.51 rows=1,011,823 width=129) (actual time=886.258..7,181.733 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. 492.563 2,855.204 ↓ 1.0 1,012,180 1

Hash Left Join (cost=47,094.64..238,067.15 rows=1,011,823 width=89) (actual time=839.654..2,855.204 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,009.190 2,356.190 ↓ 1.0 1,012,180 1

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

  • Hash Cond: (isbillable.factid = at.id)
  • Buffers: shared hit=147394
16. 517.496 517.496 ↓ 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.038..517.496 rows=944,195 loops=1)

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

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

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

  • Buffers: shared hit=23401
19. 0.002 6.451 ↓ 0.0 0 1

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

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

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

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

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

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

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

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

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

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

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

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1340kB
  • Buffers: shared hit=175
27. 10.855 10.855 ↑ 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.855 rows=20,937 loops=1)

  • Buffers: shared hit=175
28. 0.014 151.191 ↓ 3.0 3 1

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=25100
33. 0.007 139.396 ↓ 3.0 3 1

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

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

Nested Loop (cost=1.26..29,037.47 rows=1 width=80) (actual time=0.142..139.371 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.019 139.335 ↓ 5.0 5 1

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

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

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.42..29,034.55 rows=1 width=48) (actual time=0.110..139.239 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.008..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.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.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.002..0.002 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.002..0.692 rows=2,423 loops=3)

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

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

  • Buffers: shared hit=147
42. 3.444 3.444 ↓ 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.148 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.069 0.069 ↑ 1.0 1 23

Index Scan using userinfo_pkey on userinfo userinfo2 (cost=0.28..0.39 rows=1 width=19) (actual time=0.003..0.003 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.703 2.449 ↓ 1.0 2,423 1

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

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

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

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

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

  • Buffers: shared hit=14
50. 0.007 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.002 0.002 ↑ 1.0 4 1

Seq Scan on departments dep (cost=0.00..1.04 rows=4 width=9) (actual time=0.001..0.002 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.001..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.782 0.782 ↓ 0.0 0 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue8 (cost=0.56..148.80 rows=6 width=88) (actual time=0.034..0.034 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