Computer ScienceScience & MathematicsEconomics & FinanceBusiness & ManagementPolitics & GovernmentHistoryPhilosophy

Performance Tuning with SQL Server Dynamic Management Views

by Louis Davidson, Tim Ford

Performance Tuning with SQL Server Dynamic Management Views

Subscribe to new books via dBooks.org telegram channel

Join
DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

Dynamic Management Views (DMVs) are a significant and valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions and transactions.

Why, then, aren't all DBAs using them? Why do many DBAs continue to ignore them in favour of "tried and trusted" tools such as sp_who2, DBCC OPENTRAN, and so on, or make do with the "ready made" reports built into SSMS? Why do even those that do use the DMVs speak wistfully about "good old sysprocesses"?

There seem to be two main factors at work. Firstly, some DBAs are simply unaware of the depth and breadth of the information that is available from the DMvs, or how it might help them troubleshoot common issues. This book investigates all of the DMVs that are most frequently useful to the DBA in investigating query execution, index usage, session and transaction activity, disk IO, and how SQL Server is using or abusing the operating system.

Secondly, the DMVs have a reputation of being difficult to use. In the process of exposing as much useful data as possible, sysprocesses has been de-normalized, and many new views and columns have been added. This fact, coupled with the initially-baffling choices of what columns will be exposed where, has lead to some DBAs to liken querying DMVs to "collecting mystic spells".

In fact, however, once you start to write your own scripts, you'll see the same tricks, and similar join patterns, being used time and again. As such, a relatively small core set of scripts can be readily adapted to suit any requirement. This book is here to de-mystify the process of collecting the information you need to troubleshoot SQL Server problems. It will highlight the core techniques and "patterns" that you need to master, and will provide a core set of scripts that you can use and adapt for your own systems, including how to:
- Root out the queries that are causing memory or CPU pressure on your system
- Investigate caching, and query plan reuse
- Identify index usage patterns
- Track fragmentation in clustered indexes and heaps
- Get full details on blocking and blocked transactions, including the exact commands being executed, and by whom.
- Find out where SQL Server is spending time waiting for resources to be released, before proceeding
- Monitor usage and growth of tempdb

The DMVs don't make existing, built-in, performance tools obsolete. On the contrary, they complement these tools, and offer a flexibility, richness and granularity that are simply not available elsewhere. Furthermore, you don't need to master a new GUI, or a new language in order to use them; it's all done in a language all DBAs know and mostly love: T-SQL.

This open book is licensed strictly for personal or educational use. You can download Performance Tuning with SQL Server Dynamic Management Views ebook for free in PDF format (28.3 MB).

Table of Contents

Chapter 1
Using Dynamic Management Objects
Chapter 2
Connections, Sessions and Requests
Chapter 3
Query Plan Metadata
Chapter 4
Transactions
Chapter 5
Indexing Strategy and Maintenance
Chapter 6
Physical Disk Statistics and Utilization
Chapter 7
OS and Hardware Interaction

Book Details

Title
Performance Tuning with SQL Server Dynamic Management Views
Subject
Computer Science
Publisher
Red Gate
Published
2010
Pages
326
Edition
1
Language
English
ISBN13 Digital
9781906434465
ISBN10 Digital
1906434468
PDF Size
28.3 MB
License
For personal or educational use

Related Books

SQL Server Internals: In-Memory OLTP
The SQL Server 2016 In-Memory OLTP engine (a.k.a. Hekaton) is designed to exploit terabytes of available memory and high numbers of processing cores. It allows us to work with memory-optimized tables and indexes, and natively compiled stored procedures, in addition to the disk-based tables and indexes, and T-SQL stored procedures, that SQL Server h...
Data Science with Microsoft SQL Server 2016
R is one of the most popular, powerful data analytics languages and environments in use by data scientists. Actionable business data is often stored in Relational Database Management Systems (RDBMS), and one of the most widely used RDBMS is Microsoft SQL Server. Much more than a database server, it's a rich ecostructure with advanced analytic ...
Migrating SQL Server Databases to Azure
SQL Server is Microsoft's relational database management system (RDBMS). SQL Server can now be hosted entirely in Microsoft Azure, either in a hosted virtual machine (VM) or as a hosted service. Hosting a virtual machine in Azure is known as infrastructure as a service (IaaS), and hosting a service in Azure is known as platform as a service (P...
Defensive Database Programming with SQL Server
Resilient T-SQL code is code that is designed to last, and to be safely reused by others. The goal of defensive database programming, the goal of this book, is to help you to produce resilient T-SQL code that robustly and gracefully handles cases of unintended use, and is resilient to common changes to the database environment. Too often as deve...
Learning Microsoft SQL Server
Microsoft SQL Server is a relational database management system developed by Microsoft. It is an unofficial and free Microsoft SQL Server ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow....
SQL Server Execution Plans, 3rd Edition
Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. My book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you fin...