Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to solve a SQL performance problem Paul Zgondea.

Similar presentations


Presentation on theme: "How to solve a SQL performance problem Paul Zgondea."— Presentation transcript:

1 How to solve a SQL performance problem Paul Zgondea

2 Agenda DBA monitoring tools Finding the culprit Optimization time

3 First Response of a DBA What do you do when somebody asks you to investigate what’s stressing out the SQL server? What tools do you use ? What do you do when the SQL Server is too busy to accept your connection ?

4 Dedicated Admin Connection Enable DAC EXEC sp_configure 'remote admin connections', 1; GO RECONFIGURE GO

5 sp_whoisactiveby Adam Machanic Alternative for sp_who and sp_who2 Why it’s better: Runs quickly and does not use a lot of resources. Shows only the active queries (no sleeping and system processes) Shows how long the queries have been running for Shows the formatted SQL Text and Plan (@get_plans = 1) Shows waits information Shows CPU, Tempdb information,

6 DEMO TIME

7 Capture the events Extended events – fast, asynchronous – steep learning curve. SQL Trace / Profiler – old method but still used – synchronous and it adds extra load on the server.

8 Analyze the captured data Retrieve the captured data Filter, clean and group data so we can analyze it accordingly Identify the most resource intensive queries

9 Optimization time! Execution plan Indexes Re-writes Testing the final result

10 DEMO TIME

11

12 Thank you for attending! Resources will be available soon on WWW.SQLCLUJ.COM


Download ppt "How to solve a SQL performance problem Paul Zgondea."

Similar presentations


Ads by Google