Presentation is loading. Please wait.

Presentation is loading. Please wait.

Steve Lewis DBA – Express Scripts

Similar presentations


Presentation on theme: "Steve Lewis DBA – Express Scripts"— Presentation transcript:

1 Steve Lewis DBA – Express Scripts

2

3 Why Tune Performance ?

4 ORACLE is: Unbreakable

5 Why Tune Performance ? ORACLE is: Unbreakable Easily Administered

6 Why Tune Performance ? ORACLE is: Unbreakable Easily Administered Tunes Itself

7 Why Tune Performance ? 2 Reasons ~

8 Why Tune Performance ? 2 Reasons 1. Application Sensitivity

9 Why Tune Performance ? 2 Reasons 1. Application Sensitivity Get off the hot seat

10 Why Tune Performance ? 2 Reasons 1. Application Sensitivity Get off the hot seat 2. Increase Capacity ~

11 Increase Capacity - Hardware Hardware Costs $$$s (CPUs / server) Ancillary Research / Current Hardware / Load Forecast Floor space / Hosting fees Electricity

12 Increase Capacity - Hardware Software Costs OS : server + CPUs Apps / Utilities : server + CPUs Yearly Maintenance

13 Increase Capacity - Hardware Environment Costs (70 vs. 35) Network maintenance SAN maintenance Software Releases Software Patching / Backout

14 Increase Capacity - Hardware Application Performance Cost ~

15 Increase Capacity - Hardware Application Performance Cost Runs Hotter Hardware orders typically trail resource problems and have a long lead time Application Customer Management MML – fire drill App Team DBA Team Network Team San Team SA s

16 Increase Capacity – Tuning vs. Hardware

17 Increase Capacity - Tuning When ? AWR Proactive (15 top queries = 2x) Instance Load, I/O, CPU, Network Traffic OEM / Grid Control CPU Thresholds [High Level view]

18 Increase Capacity - Tuning CPU Thresholds

19

20

21 ~

22 Standard Deviation

23 3 Sigma zσzσ Percentage within Range 0.674σ50% 1σ68.27% 1.645σ90% 1.960σ95% 2σ95.45% 2.576σ99% 3σ99.73%

24 Standard Deviation = 5

25 Standard Deviation = 6

26 Standard Deviation = 1

27 Case 1 Select lname, fname, address, zip From customer Where lname = SMITH;

28 Case 1 Select lname, fname, address, zip From customer c Where lname = SMITH; /*+ parallel (c, 8) */

29 Case 1 Select lname, fname, address, zip From customer c Where lname = SMITH; NOT /*+ parallel (c, 8) */

30 Case 2 Select customer_nbr, order_nbr, order_date From orders Where order_date > sysdate -1;

31 Case 2 Select customer_nbr, order_nbr, order_date From orders Where order_date > sysdate -1; 1 Million orders going back 3 years No Index on order_date

32 Case 3 Select /*+ index (e, employee_loc) */ employee_nbr, address, location From employee Where location = HOUSTON; Plan showed table scan Added location index Forced index with hint 100,000 employees; ½ in Dallas, ½ in Houston

33 Case 3 Table Scan is the worst performance killer.

34 Case 3 Table Scan is the worst performance killer. If < 1% of table, use keyed read If > 1% of table, use table scan 1% keyed read = 100% table scan Table scan = 100x more efficient than a keyed read Worst performance killer is using an index when you should not - Up to a 100x resource mistake

35 Case 3 Select /*+ index (e, employee_loc) */ employee_nbr, address, location From employee Where location = HOUSTON; Plan showed table scan Added location index Forced index with hint 100,000 employees; ½ in Dallas, ½ in Houston 50x Mistake

36 Case 4 Select /*+ first_rows hash(e) full(l) */ employee_nbr, address, e.location, property_taxes Fromemployee e, location l Where e.location = l.location;

37 Strange Cases 1. Oracle Partition gather_stats 2. Packaged Apps 3. Non-AWR resources

38 Barriers to Performance Tuning for Capacity 1. Pressure for quick decisions and solutions that may not make long term sense. You stage future trouble. 2. All Technical barriers can be overcome. 3. Political Barriers Customer Complaints + MMLs = Hardware 2x Tuning – (MMLs + Complaints) = why spend time tuning ? May be adding hardware in other areas Strong Technical leaders and middle management advocates Ive been fortunate in this area

39 Conclusion 2 ways to address dramatic (2x) load increases Tuning and Hardware 2 different reasons for performance tuning Application Sensitivity Database Capacity Monitoring for max capacity warnings AWR CPU mean + 3 sigma Tuning cases and performance pitfalls Barriers to Performance Tuning for Capacity

40 Questions ?


Download ppt "Steve Lewis DBA – Express Scripts"

Similar presentations


Ads by Google