SQL Server Optimization Checklist



Similar documents
SQL Server Performance Tuning and Optimization

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

How To Improve Performance In A Database

Query Performance Tuning: Start to Finish. Grant Fritchey

MS SQL Performance (Tuning) Best Practices:

Performance Tuning and Optimizing SQL Databases 2016

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Solving Performance Problems In SQL Server by Michal Tinthofer

There are four technologies or components in the database system that affect database performance:

Dynamics NAV/SQL Server Configuration Recommendations

EZManage V4.0 Release Notes. Document revision 1.08 ( )

DBA 101: Best Practices All DBAs Should Follow

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

SQL Server Query Tuning

Response Time Analysis

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

Database Maintenance Essentials

ONSITE TRAINING CATALOG

Enhancing SQL Server Performance

Optimizing Performance. Training Division New Delhi

Best Practices Every SQL Server DBA Must Know

SQL Server Performance Tuning for DBAs

Course 55144B: SQL Server 2014 Performance Tuning and Optimization

Course 55144: SQL Server 2014 Performance Tuning and Optimization

Geeks with...sql Monitor

SQL Server Business Intelligence on HP ProLiant DL785 Server

Course 20464: Developing Microsoft SQL Server Databases

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

Developing Microsoft SQL Server Databases 20464C; 5 Days

Enterprise Performance Tuning: Best Practices with SQL Server 2008 Analysis Services. By Ajay Goyal Consultant Scalability Experts, Inc.

SQL Sentry Essentials

Response Time Analysis

Load Testing and Monitoring Web Applications in a Windows Environment

20464C: Developing Microsoft SQL Server Databases

Understanding SQL Server Execution Plans. Klaus Aschenbrenner Independent SQL Server Consultant SQLpassion.at

READPAST & Furious: Transactions, Locking and Isolation

Beyond Plateaux: Optimize SSAS via Best Practices

PERFORMANCE TUNING IN MICROSOFT SQL SERVER DBMS

Performance Counters. Microsoft SQL. Technical Data Sheet. Overview:

The Database is Slow

MDM Multidomain Edition (Version 9.6.0) For Microsoft SQL Server Performance Tuning

Developing Microsoft SQL Server Databases

Using Database Performance Warehouse to Monitor Microsoft SQL Server Report Content

IBM DB2: LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

SharePoint 2010 Performance and Capacity Planning Best Practices

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Performance rule violations usually result in increased CPU or I/O, time to fix the mistake, and ultimately, a cost to the business unit.

Diskeeper Can Boost Your SQL Server's Performance

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Response Time Analysis

SQL diagnostic manager Management Pack for Microsoft System Center. Overview

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

OPTIMIZING QUERIES IN SQL SERVER 2008

Tune That SQL for Supercharged DB2 Performance! Craig S. Mullins, Corporate Technologist, NEON Enterprise Software, Inc.

Disk Storage Shortfall

SQL Server 200x Optimizing Stored Procedure Performance

Developing Microsoft SQL Server Databases (20464) H8N64S

SQL Server 2016 Query Store

Throwing Hardware at SQL Server Performance problems?

SQL Server. DMVs in Action. Better Queries with. Dynamic Management Views MANNING IANW. STIRK. Shelter Island

Microsoft SQL Database Administrator Certification

Improve query performance with the new SQL Server 2016 Query Store!!

The 5-minute SQL Server Health Check

Performance Testing for Managers. Presented by Stuart Moncrieff at SIGiST Melbourne on June 15 th, 2011

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

SQL Server Performance Intelligence

Microsoft SQL Server performance tuning for Microsoft Dynamics NAV

Improving SQL Server Performance

The Complete Performance Solution for Microsoft SQL Server

SQL Server 2012 Query. Performance Tuning. Grant Fritchey. Apress*

Users are Complaining that the System is Slow What Should I Do Now? Part 1

Chapter 15: AppInsight for SQL

Data Compression in Blackbaud CRM Databases

Developing Microsoft SQL Server Databases MOC 20464

One of the database administrators

SQL Server Database Coding Standards and Guidelines

Performance Tuning for the Teradata Database

Oracle EXAM - 1Z Oracle Database 11g Release 2: SQL Tuning. Buy Full Product.

Estimate Performance and Capacity Requirements for Workflow in SharePoint Server 2010

DB2 LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Monitoring Replication

1Z0-117 Oracle Database 11g Release 2: SQL Tuning. Oracle

Load Testing Analysis Services Gerhard Brückl

This presentation is an introduction to the SQL Server Profiler tool.

David Dye. Extract, Transform, Load

Module 14: Scalability and High Availability

DB2 for Linux, UNIX, and Windows Performance Tuning and Monitoring Workshop

Administração e Optimização de BDs

Condusiv s V-locity Server Boosts Performance of SQL Server 2012 by 55%

Monitor and Manage Your MicroStrategy BI Environment Using Enterprise Manager and Health Center

Deploying and Optimizing SQL Server for Virtual Machines

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

SQL Azure and SqlBulkCopy

Back From the Dead: How to Restore a SQL Server in 60 Minutes or Less*

Concepts of Database Management Seventh Edition. Chapter 7 DBMS Functions

Execution Plans: The Secret to Query Tuning Success. MagicPASS January 2015

Brad s Sure DBA Checklist

Server 2008 SQL. Administration in Action ROD COLLEDGE MANNING. Greenwich. (74 w. long.)

PERFORMANCE TUNING FOR PEOPLESOFT APPLICATIONS

Java DB Performance. Olav Sandstå Sun Microsystems, Trondheim, Norway Submission ID: 860

Transcription:

The World s Largest Community of SQL Server Professionals SQL Server Optimization Checklist Grant Fritchey Product Evangelist Red Gate Software

Who? Product Evangelist for Red Gate Software Microsoft SQL Server MVP Author: SQL Server Execution Plans SQL Server 2008 Query Performance Tuning Distilled Chapter in SQL Server MVP Deep Dives Volume 2

Goal Describe common and recognizable types of performance issues in order to provide best practices to avoid or mitigate them.

Test Test Test Test Test

Remember This is focused on performance tuning There are always exceptions Your situation may be different Did I mention test? Incremental changes Monitor your servers

Nested Table Valued User Defined Functions User defined functions that call user defined functions that call Simplistic execution plans Unrealistic costs in execution plans Very slow performance Use properly structured queries

Cost Threshold for Parallelism Simple queries execute in parallel Cost Threshold for Parallelism set to default (5) Parallel plans for simple queries Excessive cxpacket waits (not automatically bad) Excessive queuing on CPU Increase Cost Threshold Simplify queries

Ad Hoc TSQL Memory problems caused by ad hoc tsql or bad ORM code Very low plan cache hit ratio Excessive compile events Very low page life expectancy Work with ORM tool to resolve issues Use stored procedures or parameterized queries Enable Optimize for Ad Hoc Workload

Everything on One Disk Disk queuing due to all data and logs being on a single disk Excessive disk queues Blocking from reads and writes Increase the disks or LUNs on the system Work with SAN team to ensure proper distribution

Blocking From Recompile Excessive, long-running, recompiles block system access Multiple blocked processes from single source Wait on recompile Reduce query complexity Use table variables where applicable instead of temp tables Use KEEP FIXED PLAN hint (but carefully)

Inappropriate Use of Query Hints FAST 1 query hint used everywhere Extremely simplistic execution plans Execution plan shows estimated 1 row Remove the hint Deal with performance problem directly

Inappropriate Use Of Query Hints 2 NO_LOCK query hint used everywhere Incorrect data returned Extra rows Missing rows Remove the hint Enable a type of snapshot isolation Tune queries and indexes to reduce blocking

Removing Normalization Removing foreign key constraints to speed up inserts slows down reads Bad data due to missing constraints Overly complex execution plans due to missing simplification step Use foreign key constraints Also use primary key and unique constraints

Indexes Don t Help Performance Adding an index doesn t speed up queries or it slows them down Execution plan ignores index Execution plan changes to something unexpected Verify index will help query Validate that data supports selectivity

Applying Missing Indexes Doesn t Help Missing index recommendations are applied without knowledge or testing Indexes named [<Name of Missing Index, sysname,>] Duplicate indexes Excessive number of indexes Test missing index suggestions Validate need for all indexes

Deadlocks Hurt Performance Performance impact due to large number of deadlocks Deadlock errors in log Complaints from users and errors in application Reduce contention Ensure processing order Reduce execution time

Excessive Indexes Hurt Performance An index has been created on every column in the table Indexes never touched in sys.dm_db_index_usage_stats (but be careful) Remove extraneous and unnecessary indexes Do not add indexes without cause

Checklist Exercise in caution when nesting functions and views Change default settings for cost threshold for parallelism Enable optimize for ad hoc workload Distribute storage to multiple disk locations Write TSQL to avoid unnecessary recompiles Use query hints sparingly and appropriately Use normalization, primary key, foreign key and unique constraints Add indexes judiciously Test missing index suggestions carefully Deadlocks are a performance issue and must be dealt with

Goal Describe common and recognizable types of performance issues in order to provide best practices to avoid or mitigate them.

Resources Scarydba.com\presentation-resources Microsoft SQL Server 2008 Internals Kalen Delaney et al SQL Server MVP Deep Dives Vol I & II Kalen Delaney et al Inside SQL Server 2008 T-SQL Querying Itzik Ben Gan et al Brad s Sure DBA Checklist

Questions? 21

The World s Largest Community of SQL Server Professionals Thanks for Attending Visit www.sqlservercentral.com for free SQL Server ebooks, articles, videos, blogs, news, and more. Please Don t Forget to Turn in Your Evaluations