The Top 5 SQL Server Mistakes

Slides:



Advertisements
Similar presentations
TempDB: Performance and Manageability
Advertisements

Exadata Distinctives Brown Bag New features for tuning Oracle database applications.
Big Data Working with Terabytes in SQL Server Andrew Novick
Module 4 Working with Databases. Module Overview Overview of SQL Server Databases Working with Files and Filegroups Moving Database Files.
SQL Server 2005 features for VLDBs. SQL Server 2005 features for VLDBs aka (it’s fixed in the next release)
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
SharePoint and SQL Server integration Demo: SQL Server Optimizing Configurations SQL Server 2014 for SharePoint 2013 Avoiding ginormous transaction.
Presented by Jacob Wilson SharePoint Practice Lead Bross Group 1.
Optimizing SQL Server 2012 for SharePoint 2013 SharePoint Saturday/Friday, Honolulu March 27, 2015.
SQL Server Performance Audit and Tuning Jason Pack.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
TEMPDB Capacity Planning. Indexing Advantages – Increases performance – SQL server do not have to search all the rows. – Performance, Concurrency, Required.
Module 5: Upgrading to SQL Server 7.0. Overview Planning an Upgrade Preparing to Upgrade Verifying the Upgrade Setting a Compatibility Level.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
SQL Server 2000 Sys Admin Jeremiah Curtis Engineering Services
Maciej Pilecki | Project Botticelli Ltd.. SELECT Bio FROM Speakers WHERE FullName=‘Maciej Pilecki’;  Microsoft Certified Trainer since 2001  SQL Server.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
TOP 10 Thinks you shouldn’t do with/in your database
Making DBCC CHECKDB Go Faster Argenis Fernandez Senior Database Engineer
Common SQL Performance Issues AND HOW TO AVOID OR FIX THEM.
How to kill SQL Server Performance Håkan Winther.
Get the Most out of SQL Server Standard Edition Or How to be a SQL Miser.
SQL Server 2016 – New Features Tilahun Endihnew March 12, 2016.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
Exadata Distinctives 988 Bobby Durrett US Foods. What is Exadata? Complete Oracle database platform Disk storage system Unique to Exadata – intelligent.
Fixing Page Life Expectancy Steve Hood Blog: SimpleSQLServer.com.
SQL Server Magic Buttons! What are Trace Flags and why should I care? Steinar Andersen, SQL Service Nordic AB Thanks to Thomas Kejser for peer-reviewing.
Indexing strategies and good physical designs for performance tuning Kenneth Ureña /SpanishPASSVC.
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Memory-Optimized Tables Querying at the speed of light.
Top 10 DBA mistakes that affect the SQL Server performance
Get the Most out of SQL Server Standard Edition
You Inherited a Database Now What?
Data, Space and Transaction Processing
Performance Management
SQL Server Performance Tuning
Antonio Abalos Castillo
Hitting the SQL Server “Go Faster” Button
Very Large Databases in your future
Designing Database Solutions for SQL Server
Hustle and Bustle of SQL Pages
SQL Server May Let You Do It, But it Doesn’t Mean You Should
Dynamics AX Performance
The Ins and Outs of Indexes
The Key to the Database Engine
Hitting the SQL Server “Go Faster” Button
Configuring SQL Server
Re-Indexing - The quest of ultimate automation
Indexing Fundamentals
Peter Shore SQL Saturday Cleveland 2016
SQL Server performance tuning on Azure IaaS
Turbo-Charged Transaction Logs
Very large Databases in your future Eric Peterson.
TEMPDB – INTERNALS AND USAGE
SQL Server performance tuning on Azure IaaS
Configuring SQL Server
Indexing for Beginners
Indexing For Optimal Performance
SQL Server Performance Tuning
It’s TEMPDB Why Should You Care?
Transaction Log Internals and Performance David M Maxwell
Kathi Kellenberger Kellenberger Consulting LLC
You Inherited a Database Now What?
The Ins and Outs of Indexes
Hitachi Storage Service Manager
The Five Mistakes You are Probably Making with SQL Server
The Ins and Outs of Indexes
Presentation transcript:

The Top 5 SQL Server Mistakes Kathi Kellenberger Kathi.Kellenberger@linchpinpeople.com http://auntkathisql.com

Who am I? Data Platform MVP Author Trainer Database Consultant

Agenda Physical resources Configuration Maintenance Plan Index Strategy Queries

Physical Resources: Memory Memory is the air that SQL Server breaths

Data must be in memory to be used by SQL Server Data Cache

What happens if not enough RAM for the next query? Data Cache

What if we need the first table again? Data Cache

How do you know if memory is adequate? Page Life Expectancy *The number of seconds a page is expected to live in memory

PLE Published value is 300. Inadequate for today’s servers. Jonathan Keyhaias’ recommendation for minimum RAM/4 * 300 16 GB = 1,200 minimum Watch for sustained low values Use perfmon to measure \SQLServer:Buffer Manager\Page life expectancy

PLE Example

Configuration: Tempdb Tempdb is the work horse of SQL Server

When is Tempdb Used? Temp tables and table variables live there Sorting Index maintenance (sort in tempdb option) Work tables DBCC CHECKDB Snapshot isolation Others…

Default Tempdb Configuration (pre-2016)

What Happens? Restart Temp tables Temp tables Sorting Sorting DBCC And more… Restart Temp tables Sorting DBCC And more…

How to Fix? ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'tempdev', SIZE = 8192MB ); --8GB. ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'templog', SIZE = 1024MB ); --1GB

Option: Turn Off Or Modify File Growth ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'tempdev', SIZE = 8192MB, FILEGROWTH = 0 ); -- Turn off ALTER DATABASE [tempdb] MODIFY FILE ( NAME = N'templog', SIZE = 1024MB, FILEGRWOTH = 50MB ); -- Set at 50 MB

Ultimate Tempdb Configuration Create one tempdb data file for each core up to 8 of equal size and growth characteristics Place files on separate drives Place files on fastest storage Startup trace flags 1117 and 1118 (pre-2016)

Maintenance Plan: Shrinking Files Why is it even an option???

The Maintenance Plan Wizard

What Happens? Transactions Maintenance Transactions

How to Fix? Step 1

How to Fix? Step 2 Shrinking

Index Strategy Don’t blindly follow SQL Server’s indexing advice

Missing Index Information

Database Engine Tuning Advisor

Database Engine Tuning Advisor

How to Fix?

Queries: Sargability Don’t misuse a perfectly good index

Functions on Columns Cause Scans 1

Functions on Columns Cause Scans 2

How to Fix?

How to Fix?