SQL Server Optimization Checklist - Home of the Scary DBA
Recommend Documents
For SQL Server 2005 this required setting a command line parameter (“setup.exe
... Older versions (SQL Server 2005 and earlier) required an IIS install for ...
SQL Server Audit Checklist. By K. Brian Kelley, MCSE, CISA, Security+, MVP-
SQL Server. Administrative rights over the Domain where SQL Server is installed.
Nov 28, 2012 ... Contractors may submit up to two (2) resumes, one for each potential ...
Administration (DBA) activities; utilizing extensive knowledge of Sql.
... or holding Microsoft s certifications System Administrator Pocket Survival Guide ... to get started Double click the
SQL Server 2008 Query Performance Tuning Distilled. Who? 2 ... An
understanding of how the optimizer works in support of writing better TSQL code
as well as ...
The application of computer investigation and analysis techniques to gather ... Log files (.ldf) hold all data required
12 years vast experience with the SQL Server stack. ▫ 6 years as an ... Statistics:
During the creation of a query plan, the Query Optimizer can read statistics to ...
10. Passing the requested page(s) back to the AM. 11. Passing the results set to
the. Relational Engine credit: SQL Server 2008 Internals and Troubleshooting.
M10774: Queryng Microsoft SQL Server. 2012. 670 KM ... М50439: Basics of
Transact SQL with SQL. Server 2008 R2 ... Web/Windows programiranje.
LANACO ...
May 5, 2000 - publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not
May 5, 2000 - Portions of the manuscript may be based upon pre-release versions supplied by software manu- ...... discus
... a leading manufacturer of automotive parts, is seeking ORACLE / SQL DBA
due to ... Interested individuals should submit a resume with cover letter and
salary ...
One of the most important things to do before you begin installing SQL ... clicking
on this link: http://www.microsoft.com/sqlserver/en/us/editions/express.aspx. 2.
Beginning SQL server 2005 administration / Dan Wood, Chris Leiter, Paul Turley.
... SQL server. 2. Database management. I. Leiter, Chris, 1975- II. Turley, Paul ...
You may also like to visit How to interview someone for a job. Contents: ... SSAS
Interview questions and answers (coming soon) - SQL Server Analysis Services.
Summary: Learn how to manage SQL Server 2005 Express Edition by using the
free graphical management tool, SQL Server 2005 Management Studio Express
Edition. (SSMSE). Developers and ..... presentation. The order of columns in the ...
This guide has been updated to reflect the T-SQL improvements contained within
... SMP to the Microsoft® SQL Server® Parallel Data Warehouse (PDW).
Server Security Checklist - draft revision 3a. 1 of 5. 9/27/2012. Server Security
Checklist (2009 Standard). Server identification and location: ...
Use, copying, and distribution of any EMC software described in this publication requires an applicable .... These appli
optimization subject is very deep but we will try to cover the most important points
... depth analysis of database but simple query tuning tips & tricks which can be ...
the new BI Semantic Model in SQL Server 2012 integrated with SharePoint ......
This solution also provides protection for SQL 2012 Data Warehouse by creating.
Jan 11, 2015 - http://cryptome.org/jya/digicrash.htm. David Chaum, Amos Fiat and Moni Naor, âUntraceable Electronic Cashâ, in Advances in Cryptology -.
First4 Database Partners Inc. September 20, 2012 ... Obtaining the Software. •
Publically available download from otn.oracle.com ... whether RAC is used .... .
pdf ...
Solutions–Navision®, Microsoft SQL Server 2005™ makes it easier for your
employees to ... configure OLAP cubes easily using a set of forms within Microsoft
... Microsoft SQL Server database and the Microsoft® Windows® operating
system.
SQL Server Optimization Checklist - Home of the Scary DBA
SQL Server Execution Plans. – SQL Server 2008 Query Performance Tuning
Distilled. – Chapter in SQL Server MVP Deep Dives Volume 2. The World's
Largest ...
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
The World’s Largest Community of SQL Server Professionals
Goal • Describe common and recognizable types of performance issues in order to provide best practices to avoid or mitigate them.
The World’s Largest Community of SQL Server Professionals
Test Test
Test
Test
Test The World’s Largest Community of SQL Server Professionals
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
The World’s Largest Community of SQL Server Professionals
Nested Table Valued User Defined Functions • Problem – User defined functions that call user defined functions that call…
• Identification – Simplistic execution plans – Unrealistic costs in execution plans – Very slow performance
• Resolution – Use properly structured queries The World’s Largest Community of SQL Server Professionals
Cost Threshold for Parallelism • Problem – Simple queries execute in parallel
• Identification – – – –
Cost Threshold for Parallelism set to default (5) Parallel plans for simple queries Excessive cxpacket waits (not automatically bad) Excessive queuing on CPU
• Resolution – Increase Cost Threshold – Simplify queries The World’s Largest Community of SQL Server Professionals
Ad Hoc TSQL • Problem – Memory problems caused by ad hoc tsql or bad ORM code
• Identification – Very low plan cache hit ratio – Excessive compile events – Very low page life expectancy
• Resolution – Work with ORM tool to resolve issues – Use stored procedures or parameterized queries – Enable ‘Optimize for Ad Hoc Workload’ The World’s Largest Community of SQL Server Professionals
Everything on One Disk • Problem – Disk queuing due to all data and logs being on a single disk
• Identification – Excessive disk queues – Blocking from reads and writes
• Resolution – Increase the disks or LUNs on the system – Work with SAN team to ensure proper distribution The World’s Largest Community of SQL Server Professionals
Blocking From Recompile • Problem – Excessive, long-running, recompiles block system access
• Identification – Multiple blocked processes from single source – Wait on recompile
• Resolution – Reduce query complexity – Use table variables where applicable instead of temp tables – Use KEEP FIXED PLAN hint (but carefully) The World’s Largest Community of SQL Server Professionals
Inappropriate Use of Query Hints • Problem – FAST 1 query hint used everywhere
• Resolution – Remove the hint – Deal with performance problem directly The World’s Largest Community of SQL Server Professionals
Inappropriate Use Of Query Hints 2 • Problem – NO_LOCK query hint used everywhere
• Identification – Incorrect data returned – Extra rows – Missing rows
• Resolution – Remove the hint – Enable a type of snapshot isolation – Tune queries and indexes to reduce blocking The World’s Largest Community of SQL Server Professionals
Removing Normalization • Problem – Removing foreign key constraints to speed up inserts slows down reads
• Identification – Bad data due to missing constraints – Overly complex execution plans due to missing simplification step
• Resolution – Use foreign key constraints – Also use primary key and unique constraints The World’s Largest Community of SQL Server Professionals
Indexes Don’t Help Performance • Problem – Adding an index doesn’t speed up queries or it slows them down
• Identification – Execution plan ignores index – Execution plan changes to something unexpected
• Resolution – Verify index will help query – Validate that data supports selectivity The World’s Largest Community of SQL Server Professionals
Applying Missing Indexes Doesn’t Help • Problem – Missing index recommendations are applied without knowledge or testing
• Identification – Indexes named [] – Duplicate indexes – Excessive number of indexes
• Resolution – Test missing index suggestions – Validate need for all indexes The World’s Largest Community of SQL Server Professionals
Deadlocks Hurt Performance • Problem – Performance impact due to large number of deadlocks
• Identification – Deadlock errors in log – Complaints from users and errors in application
• Resolution – Reduce contention – Ensure processing order – Reduce execution time The World’s Largest Community of SQL Server Professionals
Excessive Indexes Hurt Performance • Problem – An index has been created on every column in the table
• Identification – Indexes never touched in sys.dm_db_index_usage_stats (but be careful)
• Resolution – Remove extraneous and unnecessary indexes – Do not add indexes without cause The World’s Largest Community of SQL Server Professionals
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 The World’s Largest Community of SQL Server Professionals
Goal • Describe common and recognizable types of performance issues in order to provide best practices to avoid or mitigate them.
The World’s Largest Community of SQL Server Professionals
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 The World’s Largest Community of SQL Server Professionals
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