Top Banner
 Unit 1: Measuring Database Performance
11

2784A_W01 Measuring Database Performance

Feb 29, 2016

Download

Documents

bd
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 1/11

Unit 1:Measuring Database

Performance

Page 2: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 2/11

Overview

Best Practices for Measuring Performance

Key Measures for Query Performance

Using Performance Monitor

Using SQL Server ProfilerGuidelines for Identifying Locking and Blocking

Lab Scenario

Lab Outcomes

Lab: Measuring Database Performance

Lab Discussion

Page 3: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 3/11

Best Practices for Measuring Performance

When measuring performance:

Identify a performance baseline

Use appropriate SQL Server and Windows tools

SQL Server ProfilerPerformance Monitor

Activity Monitor

Carefully select the performance problems to monitor

with each tool

Page 4: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 4/11

Key Measures for Query Performance

Key factors for query performance:

SQL Server tools to measure query performance:

Resources used to execute the query

Time required for query execution

Performance Monitor

SQL Server Profiler

Page 5: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 5/11

Using Performance Monitor

Useful Performance Monitor counters are:

SQLServer:Access Methods

SQLServer:SQL Statistics

SQLServer:Databases

SQLServer:Transactions

SQLServer:Locks

Page 6: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 6/11

Using SQL Server Profiler

Useful SQL Server Profiler events are:Stored Procedures category:

RPC:Completed

SP:Completed

SP:StmtCompletedTSQL category:

SQL:StmtCompleted

SQL:BatchCompleted

Locks category:

Lock:Acquired

Lock:Released

Lock:Timeout

Page 7: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 7/11

Guidelines for Identifying Locking and Blocking

Guidelines to identify procedures that cause lockingand blocking:

Use Activity Monitor

Use SQL Server Profiler blocked process reportWatch for situations in which the same procedureexecutes in different amounts of time

Identify the transaction isolation level of the procedure

Page 8: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 8/11

Lab Scenario

Background information

Current situation

Requirements

Page 9: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 9/11

Lab Outcomes

Anomalies and issues with the physicalschema identified

Baseline performance times recorded

Potential concurrency issues identified

Prioritized list of potential problems orissues recorded

Page 10: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 10/11

Lab: Measuring Database Performance

Exercise 1: Reviewing Tables andScripts

Exercise 2: Capturing BaselinePerformance

Exercise 3: Prioritizing IdentifiedProblems

Page 11: 2784A_W01 Measuring Database Performance

7/18/2019 2784A_W01 Measuring Database Performance

http://slidepdf.com/reader/full/2784aw01-measuring-database-performance 11/11

Lab Discussion

Does your company take regular baselinemeasurements?

If not, why not? Why do most companiesnot take baselines?

Could you automate the performancebaseline process?

From the analysis of the database, whatareas require review?