explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tLaW

Settings
# exclusive inclusive rows x rows loops node
1. 0.159 7,749.291 ↓ 3.8 23 1

Sort (cost=833,462.99..833,463.00 rows=6 width=369) (actual time=7,749.285..7,749.291 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.003..0.004 rows=1 loops=1)

  • Buffers: shared hit=1
4. 0.042 7,749.128 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,867.26..833,461.90 rows=6 width=369) (actual time=7,468.680..7,749.128 rows=23 loops=1)

  • Buffers: shared hit=175460
5. 0.025 7,748.396 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,866.70..833,286.77 rows=6 width=314) (actual time=7,468.635..7,748.396 rows=23 loops=1)

  • Buffers: shared hit=175253
6. 0.038 7,747.566 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,866.14..833,111.71 rows=6 width=243) (actual time=7,468.574..7,747.566 rows=23 loops=1)

  • Buffers: shared hit=175046
7. 0.054 7,747.436 ↓ 3.8 23 1

Hash Join (cost=78,865.57..833,107.78 rows=6 width=230) (actual time=7,468.546..7,747.436 rows=23 loops=1)

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

Nested Loop Left Join (cost=78,763.15..833,005.28 rows=6 width=229) (actual time=7,466.038..7,744.906 rows=23 loops=1)

  • Buffers: shared hit=174978
9. 0.048 7,744.872 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,763.02..833,004.34 rows=6 width=214) (actual time=7,466.035..7,744.872 rows=23 loops=1)

  • Buffers: shared hit=174978
10. 0.031 7,744.824 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,762.74..833,002.43 rows=6 width=203) (actual time=7,466.032..7,744.824 rows=23 loops=1)

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

Nested Loop Left Join (cost=78,762.46..833,000.54 rows=6 width=203) (actual time=7,466.021..7,744.747 rows=23 loops=1)

  • Buffers: shared hit=174913
12. 355.036 7,744.601 ↓ 3.8 23 1

Hash Join (cost=78,762.18..832,998.17 rows=6 width=192) (actual time=7,466.005..7,744.601 rows=23 loops=1)

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

Hash Left Join (cost=49,223.10..789,541.56 rows=1,012,180 width=129) (actual time=886.766..7,238.964 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. 486.075 2,856.310 ↑ 1.0 1,012,180 1

Hash Left Join (cost=47,102.68..238,077.86 rows=1,012,180 width=89) (actual time=838.831..2,856.310 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,024.678 2,363.520 ↑ 1.0 1,012,180 1

Hash Right Join (cost=46,175.61..229,559.42 rows=1,012,180 width=89) (actual time=832.101..2,363.520 rows=1,012,180 loops=1)

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

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

Hash (cost=33,522.80..33,522.80 rows=1,012,180 width=88) (actual time=828.421..828.421 rows=1,012,180 loops=1)

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

Seq Scan on dm_attendancetimeallocation_facts at (cost=0.00..33,522.80 rows=1,012,180 width=88) (actual time=0.006..371.130 rows=1,012,180 loops=1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Nested Loop (cost=1.26..29,037.47 rows=1 width=80) (actual time=0.143..138.417 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.021 138.380 ↓ 5.0 5 1

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

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

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.42..29,034.55 rows=1 width=48) (actual time=0.108..138.282 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.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.031 2.031 ↓ 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.677 rows=2,423 loops=3)

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

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

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

Seq Scan on userhierarchy userhierarchy13 (cost=0.00..119.55 rows=2,376 width=8) (actual time=0.006..1.145 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.003..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.709 2.476 ↓ 1.0 2,423 1

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

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

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

  • Hash Cond: (du.departmentid = dep.id)
  • Buffers: shared hit=15
49. 0.528 0.528 ↓ 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.528 rows=2,423 loops=1)

  • Buffers: shared hit=14
50. 0.005 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.003 0.003 ↑ 1.0 4 1

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

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue8 (cost=0.56..29.17 rows=1 width=87) (actual time=0.035..0.035 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 ↑ 2.0 1 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.56..29.17 rows=2 width=87) (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