Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presenter: Red Devilic Sponsored by SQLViet.com 22/12/2013 SQL SERVER CONFERENCE HCMC 2013 DATABASE TUNING PERFORMANCE OVERVIEW.

Similar presentations


Presentation on theme: "Presenter: Red Devilic Sponsored by SQLViet.com 22/12/2013 SQL SERVER CONFERENCE HCMC 2013 DATABASE TUNING PERFORMANCE OVERVIEW."— Presentation transcript:

1 Presenter: Red Devilic Sponsored by SQLViet.com 22/12/2013 SQL SERVER CONFERENCE HCMC 2013 DATABASE TUNING PERFORMANCE OVERVIEW

2 CONTENT Why - When tuning DB Performance Diffirent approaches for Tuning Performance Server Tuning Instance Tuning Objects Tuning SQLs Tuning Q & A

3 WHY – WHEN TUNING DB PERFORMANCE Why Increasing performance Saving resources Reducing risks When Developing Maintaining Having problems

4 DIFFIRENT APPROACHES Solving Problems and releavant components from user feedbacks. Based on alert log From DBA advices Follow Tuning Performance Process

5 DIFFIRENT APPROACHES © Tuning Performance Process Server Instance Object SQL Statements

6 SERVER TUNING Disk CPU RAM Network

7 INSTANCE TUNING Instance vs Database Instance Tuning Processes Memory Buffer Cache Query Cache

8 INSTANCE TUNING © Buffer Cache Buffer Cache Hit Ratio

9 INSTANCE TUNING © Query Cache Kind of requests Dynamic SQL Stored Procedure, Funtion CLR …

10 INSTANCE TUNING © Example SELECT * FROM dbo.Tblxxx WHERE col1 = 1; SELECT * FROM dbo.Tblxxx WHERE col1 = 2; Parameterized Query Dynamic Query SP_EXECUTESQL Rewrite using Stored Procedure

11 INSTANCE TUNING © Dynamic Condition SELECT * FROM tbl WHERE @condition Using WHERE 1 = 1 SELECT * FROM tbl WHERE @condition WHERE (CustomerID = @custid OR @custid IS NULL) AND (DepartmentID = @depid OR @depid IS NULL) Dynamic List SELECT * FROM tbl WHERE col IN (@list) SELECT * FROM tbl WHERE col IN (SELECT col FROM TableFromList(@list))

12 OBJECTS TUNING Tuning Object Database Structure Object Parameter Objects Physical Object Data File Logical Object Table Index

13 OBJECTS TUNING © Physical Object Multi Data Files Separate Data File for Table, Index Reducing auto extent Data File Logical Object FILLFACTOR Kind of Index, Table

14 OBJECTS TUNING © Database Structure Dernormalization Vertical Partitioning Horizontal Partitioning Aggregation Queries

15 SQLS TUNING

16 SQLS TUNING © Identify bad queries

17 SQLS TUNING © Automatic SQL Tuning Advisor 3 rd Software Manual

18 SQLS TUNING © Change Access Methods Rewrite WHERE to use Indexes COMPUTED Column FBI Index Change Index Type Selectivity Order Lookup Operation

19 SQLS TUNING © Change Access Methods Rewrite WHERE to use Indexes COMPUTED Column FBI Index Change Index Type Selectivity Order Lookup Operation

20 SQLS TUNING ©

21

22 Change Join Type Reduce Order Operators ORDER BY DISTINCT GROUP BY

23 MY APPROACHES Existing System SQL Tuning Object Tuning Instance Tuning Server Tuning

24 MY APPROACHES © New System Server Tuning Instance Tuning Object Tuning SQL Tuning

25 Q & A THANK YOU


Download ppt "Presenter: Red Devilic Sponsored by SQLViet.com 22/12/2013 SQL SERVER CONFERENCE HCMC 2013 DATABASE TUNING PERFORMANCE OVERVIEW."

Similar presentations


Ads by Google