CFUNITED – The premier ColdFusion conference www.cfunited.com SQL Server 2000 and 2005 Performance Tuning Jeremy Kadlec Edgewood Solutions www.edgewoodsolutions.com.

Slides:



Advertisements
Similar presentations
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Advertisements

DAT 342 Advanced SQL Server Performance and Tuning Bren Newman Program Manager SQL Server Development Microsoft Corporation.
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Slide 1. © 2012 Invensys. All Rights Reserved. The names, logos, and taglines identifying the products and services of Invensys are proprietary marks.
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.
Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
The Essentials: DMV’s and T-SQL for the DBA Rocky Mountain Tech Tri-Fecta.
11 MONITORING MICROSOFT WINDOWS SERVER 2003 Chapter 3.
Jeremy Boyd Director – Mindscape MSDN Regional Director
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
SQL Server 2005 SP2 Israeli SQL Server User Group March 2005 Ami Levin
SQL Server 2005 Express Jeremy Kadlec Edgewood Solutions
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Edgewood Solutions SQL Server Performance Tuning Concepts MDCFUG September 13, 2005 Jeremy Kadlec of Edgewood Solutions.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
Improving Efficiency of I/O Bound Systems More Memory, Better Caching Newer and Faster Disk Drives Set Object Access (SETOBJACC) Reorganize (RGZPFM) w/
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Agenda for Today Do Chapter 14 Final Project Review for Final.
Performance Dash A free tool from Microsoft that provides some quick real time information about the status of your SQL Servers.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
DAT 360: DTS in SQL Server 2000 Best Practices Euan Garden Group Manager, SQL Server Microsoft Corporation.
A Brief Documentation.  Provides basic information about connection, server, and client.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
DAT 332 SQL Server 2000 Data Transformation Services (DTS) Best Practices Euan Garden Product Unit Manager SQL Server Development Microsoft Corporation.
Enterprise Database Administration & Deployment SIG ▪ 313M ▪ Sept 29, 2005 ▪ 10:15 AM SQL Server 2005 Performance Diagnosis and Tuning using SQL Tools.
SQL School is strongly committed to provide COMPLETE PRACTICAL REALTIME Trainings on SQL Server Technologies – Dev, SQL DBA, MSBI (SSIS, SSAS, SSRS) and.
Troubleshooting SQL Server Performance: Tips &Tools Amit Khandelwal.
IT System Administration Lesson 3 Dr Jeffrey A Robinson.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
Presented by Vishy Grandhi.  Lesson 1: AX Overview  Lesson 2: Role based security  Lesson 3: Monitoring  Troubleshooting.
CFUNITED – The premier ColdFusion conference SQL Server 2005 Express Jeremy Kadlec Edgewood Solutions
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
Dave LinkedIn
Linkedin: dennisegraham Dennis E Graham Reporting For SQL Health.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
Improve query performance with the new SQL Server 2016 query store!! Michelle Gutzait Principal Consultant at
This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information.
Getting the Most from SQL Server 2005 Don Vilen Program Manager SQL Server Microsoft Corporation.
SQL Server DBA Online TrainingSQL Server DBA Online Training.
SQL Database Management
AX Performance Tools Present and Future
Query Performance Tuning: Start to Finish
SQL Server Monitoring Overview
MONITORING MICROSOFT WINDOWS SERVER 2003
Software Architecture in Practice
SQL 2014 In-Memory OLTP What, Why, and How
SQL Server Performance Tuning
Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
Chapter 11 Managing Databases with SQL Server 2000
Sql Saturday Philadelphia
Presentation transcript:

CFUNITED – The premier ColdFusion conference SQL Server 2000 and 2005 Performance Tuning Jeremy Kadlec Edgewood Solutions

June 28 th – July 1 st 2006 Session Agenda  Introductions  The Reality  Design and Development  Monitor and Diagnose  Q & A and thank you

June 28 th – July 1 st 2006 Jeremy Kadlec  Edgewood Solutions ( Customer focused SQL Server solutions Planning, Audits, Integration, Training, Products  Performance Tuning, Administration, Development, Upgrades, High Availability, Disaster Recovery, Database Auditing  Principal Database Engineer  Author of numerous SQL Server resources SearchSQLServer.com – Ask the Experts The Rational Guide to IT Project Management  NOVA SQL Co-Leader –  SQL Server 2005 Adoption Rate Report

June 28 th – July 1 st 2006 Topic 1 – The Reality  People, Process, Technology  Best Practices  Performance Tuning Circle of Life

June 28 th – July 1 st 2006 People, Process, Technology Talented team with architecture, hardware, development and database expertise Documented and practiced processes to analyze, prioritize, develop, test, implement and learn Intuitive tools with the ability to make informed decisions and accurate corrections efficiently People Technology Process

June 28 th – July 1 st 2006 Performance Tuning Best Practices Focus on performance needs from the project scope to maintenance Design and develop for high performance Hardware, Windows, SQL Server and application System baseline with ongoing comparisons Monitor, analyze, alert and report Solidified change management process Properly designate permissions based on duties Work towards continuous improvements

June 28 th – July 1 st 2006 Performance Tuning Circle of Life  Art and a science  People, Processes and Technology  Few simple problems, typically complex based on application  Holistic view needed  Goal – Accurate and efficient correction without any biases Analyze Prioritize Develop Test Implement Learn

June 28 th – July 1 st 2006 Topic 2 – Design and Development  Idealistic Hardware Configuration  Paint Like Leonardo  The Index Impact  T-SQL Coding  Graphical Query Plans

June 28 th – July 1 st 2006 Idealistic Hardware Configuration DiskDisksSizeControllerRAIDSizeVolumePurpose 0272 GB1 – 1172C:\Windows, SQL Server Program Files and System Databases (Master, Model, MSDB) (Random) 1272 GB1 – 1172D:\Tempdb (Random) 2272 GB1 – 2172E:\Database Transaction Logs (Sequential) 3572 GB2 – 15288F:\Databases (Random) 4372 GB2 – 25144G:\Backups and Batch Processing (Sequential) 14648

June 28 th – July 1 st 2006 Be Like Leonardo…  Leverage the inherent data modeling and data dictionary capabilities in Enterprise Manager  Share among IT and business team to improve communications  Demo

June 28 th – July 1 st 2006 The Index Impact  Identify valuable indexes per table Coffee break – Indexes needed Page splitting – Too compact fill factor More indexes then columns – Too many indexes  Balance SELECT vs. INSERT, UPDATE and DELETE statements  Validate performance expectations  Schedule predefined index maintenance  Don’t forget UPDATE STATISTICS  Good candidates for indexes PK, FK, JOIN, WHERE, ORDER BY, GROUP BY

June 28 th – July 1 st 2006 Database Engine Tuning Advisor  Start | All Programs | Microsoft SQL Server 2005 | Performance Tools  Capture data via Profiler and save to a table  Index and partition analysis  Analyze results and provide data with the percentage improvement

June 28 th – July 1 st 2006 Index Maintenance  DBCC SHOWCONTIG Determine the table, index and data fragmentation Rule of thumb 80% fragmentation  Index rebuild options SQL Server Maintenance Wizard DBCC DBREINDEX DROP INDEX and CREATE INDEX DBCC INDEXDEFRAG

June 28 th – July 1 st 2006 T-SQL Coding  Rely on set based logic, no cursors or looping when unnecessary  Leverage stored procedures  Avoid dynamic SQL use compiled code  Review query plans for all code and optimize each query  Reference the materials from Selene Bainum for specific examples

June 28 th – July 1 st 2006 Query Analyzer – Query Plan  Ability to graphically review the query execution plan  Insight into SQL Server’s optimizer  Ability to change code and review the optimizer’s impact immediately  SET SHOWPLAN_ALL  SET SHOWPLAN_TEXT

June 28 th – July 1 st 2006 Topic 3 – Monitor and Diagnose  Performance Monitor  SQL Server Profiler  Locking and Blocking

June 28 th – July 1 st 2006 Performance Monitor Overview – Capture a macro view of the servers with the ability to configure counters with specific sample rates save to a log file or real time monitor Counters Memory, Processors SQL Server Network Activity, Disk Drives System Statistics (Threads, Context Switching, Queuing, etc.) Samples – Secs to mins

June 28 th – July 1 st 2006 Performance Monitor Counters  Memory Page Reads/sec Page Writes/sec Page Input/sec Page Output/sec  Network Interface Bytes Received/sec Bytes Sent/sec Bytes Total/sec Current Bandwidth Output Queue Length  Objects All  Paging File All  Physical Disk % Disk Read Time % Disk Write Time % Idle Time Avg Disk Bytes/Read Avg Disk Bytes/Transfer Avg Disk Bytes/Write Avg Disk Queue Length Current Disk Queue Length  Process % Privileged Time % Processor Time % User Time  Processor % Privileged Time % Processor Time % User Time

June 28 th – July 1 st 2006 Performance Monitor Counters  Server Work Queues Active Threads Available Threads Queue Length Total Bytes/sec Total Operations/sec  SQLServer:Access Methods Full Scans Page Splits/sec Table Lock Escalations/sec  SQLServer:Cache Manager Cache Hit Ratio - _Total Cache Pages - _Total  SQLServer:Databases Transactions/sec  SQLServer:General Statistics Logins/sec Logouts/sec User Connections  SQLServer:Locks Number of Deadlocks/sec

June 28 th – July 1 st 2006 SQL Server 2005 Profiler Overview – Micro view of all SQL Server transactions saved to a log file or database table Filters – Ability to capture a subset of the transactions based on the transaction type, user, application, etc. Concerns – High system overhead

June 28 th – July 1 st 2006 SQL Profiler Event Data  Cursors CursorOpen CursorExecute CursorClose  Errors and Warnings Hash Warning Missing Column Statistics  Locks Lock:Deadlock Lock:Timeout  TSQL Unprepare SQL  Parallelism Degree of Parallelism – All Counters Execution Plan Show Plan All Show Plan Statistics Show Plan Text  Stored Procedure SP:Starting SP:Completed SP:Recompile SP:StmtCompleted SP:StmtStarting

June 28 th – July 1 st 2006 SQL Server Enhancements  Use SQL 2005 Profiler to capture data on a SQL Server 2000 server  Profiler for SQL 2005 Analysis Services  Ability to review Profiler and Perfmon data in a single interface

June 28 th – July 1 st 2006 Locking and Blocking Blocking and Blocker Spids Associated Code Common Tables Business Processes  Which processes (spids) are blocking?  What code (stored procedures, functions, ad-hoc, etc.) corresponds to the spids?  Which tables does the code share?  Which business processes map back to the code?

June 28 th – July 1 st 2006 SQL Activity Monitor  Management Studio | Management folder | Activity Monitor icon  Snapshot of SQL Server processing

June 28 th – July 1 st 2006 Dynamic Management Views  Operate in near real time from internal structures at a Server and Component level dm_exec_* = Execution of user code and associated connections dm_os_* = Memory, locking and scheduling dm_tran_* = Transactions and isolation dm_io_* = I/O on network and disks dm_db_* = Databases and database objects dm_repl_* = Replication dm_broker_* = SQL Service Broker dm_fts_* = Full Text Search dm_qn_* = Query Notifications dm_clr_* = Common Language Runtime

June 28 th – July 1 st 2006 How DMVs Improve Management  Index-related DMVs sys.dm_db_index_physical_stats  Size and fragmentation information for tables and indexes sys.dm_db_index_operational_stats  Internals information for table and index activities sys.dm_db_index_usage_stats  Index statistics and usage counts information for individual indexes sys.dm_db_index_partition_stats  Page and row-count information for every partition

June 28 th – July 1 st 2006 Questions and Thank You Jeremy Kadlec Edgewood Solutions