A Small Class Size is the Best Learning Environment*
Only F1 has no more than 6 Delegates in a Class
Everyone has Individual Attention from the Trainer
Standard
SQL Server 2005

Tuning and Optimizing Queries using Microsoft SQL Server 2005
(Microsoft Training Course: 2784) - 3 days - £1150 exc VAT

 FebMarAprMayJunJulAugSepOctNovDecJan
London19 16 21 18 16 20 17 15 19 17
Ask a Question ?Print 2 Page PDF


> Target Audience
This workshop provides database developers the knowledge and skills to evaluate and improve queries and query response times. It is intended for current professional database developers who have three or more years of on-the-job experience developing SQL Server database solutions in an enterprise environment.
> Course outline
  1. Measuring Database Performance
  2. Optimizing Physical Database Design
  3. Optimizing Queries for Performance
  4. Refactoring Cursors into Queries
  5. Optimizing an Indexing Strategy
  6. Managing Concurrency

Supplementary Information Please note that this course is mainly workshop based. This involves the Trainer spending a short time introducing each topic followed by the students performing Labs and Workshops, with the assistance of the trainer if needed. The pre-requisites for this course state that students should be familiar with SQL Server 2005 features, tools and technologies, and our Trainers suggest that the knowledge should include Transact-SQL, SQL Server 2005 queries, stored procedures and functions.
Module 1: Measuring Database Performance
  • Importance of Benchmarking
  • Key Measures for Query Performance: Sysmon
  • Key Measures for Query Performance: Profiler
  • Guidelines for Identifying Locking and Blocking
  • Lab: Measuring Database Performance
Skills
  • Describe best practices for measuring performance.
  • Describe the key Sysmon counters for problem identification.
  • Describe the key Profiler trace events for problem identification.
  • Select best methods for identifying which procedures are causing locking and blocking.
  • Review database tables and scripts.
  • Use a script to identify performance and concurrency problems.
  • Capture baseline performance.
  • Prioritize identified problems.
top
Module 2: Optimizing Physical Database Design
  • Performance Optimization Model
  • Schema Optimization Strategy: Keys
  • Schema Optimization Strategy: Responsible Denormalization
  • Schema Optimization Strategy: Generalization
  • Lab: Optimizing Schemas
Skills
  • Explain the strategy for database optimization presented in the Performance Optimization Model.
  • Explain the importance of schema design in database optimization.
  • Describe the strategic use of natural and surrogate keys and their roles in schema optimization.
  • Describe responsible denormalization and the role of this strategy in schema optimization.
  • Describe generalization and the role of this strategy in schema optimization.
  • Normalize a database schema for optimization.
  • Generalize a database schema for optimization.
  • Denormalize a database schema for optimization.
  • Clean up database schema by verifying and adjusting data types and verifying referential integrity.
  • Convert data to the new schema.
  • Correct table and column names in queries, stored procedures, and triggers to reconcile schema changes.
  • Test for performance.
top
Module 3: Optimizing Queries for Performance
  • Performance Optimization Model: Queries
  • What Is Query Logical Flow?
  • Considerations for Using Subqueries
  • Guidelines for Building Efficient Queries
  • Lab: Optimizing Queries
Skills
  • Explain the importance of set-based solutions in database optimization.
  • Explain the utility of the query logical flow diagram in query optimization.
  • Discuss considerations when using subqueries in query optimization.
  • Describe strategies for building efficient queries.
  • Rewrite stored procedures for optimization.
  • Rewrite views for optimization.
  • Rewrite non-cursor aggregate queries for optimization.
  • Test queries for performance.
top
Module 4: Refactoring Cursors into Queries
  • Performance Optimization Model: Query-Set-based solutions
  • Five Steps to Building a Cursor
  • Strategies for Refactoring Cursors
  • Lab: Refactoring Cursors into Queries
Skills
  • Explain the importance of set-based solutions in database optimization.
  • List five steps to building a cursor.
  • Describe strategies for refactoring cursors.
  • Refactor cursors into queries by rebuilding cursor logic as multiple queries, user-defined function, and complex queries with case expression.
  • Test queries for performance.
top
Module 5: Optimizing an Indexing Strategy
  • Performance Optimization Model: Indexes
  • Considerations for Using Indexes
  • Best Uses of the Clustered Index
  • Best Practices for Non-Clustered Index Design
  • How to Document an Indexing Strategy
  • Lab: Optimizing an Indexing Strategy
Skills
  • Explain the importance of optimizing index strategies in database optimization.
  • Explain considerations for using indexes in database optimization.
  • Describe the best uses of clustered indexes as they relate to optimization.
  • Describe the best practices for designing non-clustered databases.
  • Explain the methodology for using an indexing strategy worksheet.
  • Determine tables that need to be optimized based on slow running code.
  • Design, implement, and adjust clustered and non-clustered indexes.
  • Test for performance.
top
Module 6: Managing Concurrency
  • Performance Optimization Model: Locking and Blocking
  • Multimedia - "How to Use Efficient Queries to Reduce Locking and Blocking"
  • Strategies to Reduce Locking and Blocking
  • Lab: Reducing Blocking
Skills
  • Explain the importance of concurrency management in database optimization.
  • Explain how efficient queries reduce locking and blocking.
  • List strategies for reducing locking and blocking.
  • Identify code with locking and blocking issues.
  • Tighten and optimize logical transactions in code with concurrency issues.
  • Adjust transaction isolation levels in code with concurrency issues.
  • Test database for performance.
  • Determine percentage gain on database performance from baseline.
top
> Pre-Requisites
Before attending this course, students must have the following pre-requisites:
  • Be familiar with SQL Server 2005 features, tools, and technologies.
  • Have basic knowledge of the operating system and platform.
  • Have had hands-on database developer experience.
  • Have a Microsoft Certified Technology Specialist: Microsoft SQL Server 2005 credential - or equivalent experience.
  • In addition, it is recommended, but not required, that students have completed: Course 2778, Writing Queries Using Microsoft SQL Server 2005 Transact-SQL; Course 2779, Implementing a Microsoft SQL Server 2005 Database; Course 2780, Maintaining a Microsoft SQL Server 2005 Database.
> Purpose
After completing this course, students will be able to design a normalized database; optimize a database design by denormalizing; optimize data storage; manage concurrency by selecting the appropriate transaction isolation level; select a locking granularity level; optimize and tune queries for performance; optimize an indexing strategy; decide when cursors are appropriate; identify and resolve performance-limiting problems.
> Supplementary Information
Please note that this course is mainly workshop based. This involves the Trainer spending a short time introducing each topic followed by the students performing Labs and Workshops, with the assistance of the trainer if needed. The pre-requisites for this course state that students should be familiar with SQL Server 2005 features, tools and technologies, and our Trainers suggest that the knowledge should include Transact-SQL, SQL Server 2005 queries, stored procedures and functions.
> EXAMS
There are no exams directly associated with this course