SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Tuna Helper
For SQL Server DBAs
  Speaker: Dean Richards
  Senior DBA, Confio Software


  San Francisco SQL Server User Group
               April 2010




     Mark Ginnebaugh, User Group Leader,
           mark@designmind.com
Tuna Helper
    Proven Process for SQL Tuning
               Dean Richards
        Senior DBA, Confio Software



2
Tuna Helper – Proven Process for SQL Tuning




         Give a man a fish and you feed him for a day.
       Teach a man to fish and you feed him for a lifetime.
                       Chinese Proverb
3
Who Am I?

    Senior DBA for Confio Software
    • DeanRichards@confio.com
    Current – 20+ Years in SQL Server & Oracle
    • DBA and Developer
    Specialize in Performance Tuning
    Review Performance of 100’s of Databases for
    Customers and Prospects
    Common Thread – Paralyzed by Tuning


4
Agenda

    Introduction
    Challenges
    Identify - Which SQL and Why
    Gather – Details about SQL
    Tune – Case Study
    Monitor – Make sure it stays tuned




5
Introduction

    Tuning is Hard
    This Presentation is an Introduction
    • 3-5 day detailed classes are typical
    Providing a Framework
    •   Helps develop your own processes
    •   There is no magic tool
    •   Tools cannot reliably tune SQL statements
    •   Tuning requires the involvement of you and other
        technical and functional members of team


6
Challenges

    Requires Expertise in Many Areas
    • Technical – Plan, Data Access, SQL Design
    • Business – What is the Purpose of SQL?
    Tuning Takes Time
    • Large Number of SQL Statements
    • Each Statement is Different
    Low Priority in Some Companies
    • Vendor Applications
    • Focus on Hardware or System Issues


7
Identify – End-to-End

    Business Aspects
    •   Who registered yesterday for SQL Tuning
    •   Why does the business need to know this
    •   How often is the information needed
    •   Who uses this information
    Technical Information
    • Review ERD
    • Understand tables and the data (at a high level)
    End-to-End Process
    • Understand application architecture
    • What portion of the total time is database
    • Where is it called from in the application

8
Identify – End-to-End Time




9
Identify – Which SQL
       User / Batch Job Complaints
       Tracing a Session / Process
       Queries Performing Most I/O (LIO, PIO)
       Queries Consuming CPU
       Queries Doing Table or Index Scans
       Known Poorly Performing SQL
       Highest Response Times (Wait Types)
     SELECT sql_handle, statement_start_offset,
        statement_end_offset, plan_handle, execution_count,
        total_logical_reads, total_physical_reads,
        total_elapsed_time, st.text
     FROM sys.dm_exec_query_stats AS qs
     CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
     ORDER BY total_elapsed_time DESC


10
Measure Response/Wait Time

     Focus on End User Response Time




      Understand the total time a Query spends in Database
      Measure time while Query executes
      SQL Server helps by providing Wait Types
11
Banking Analogy


     Tellers are the CPUs
     Customers being helped are “running”
     Customers waiting in line are “runnable”
     Customer 1 Requires Higher Level Signature
      • Customer 1 “waits” on “Signature”
      • Customer 2 is checked out, i.e. “running”
      • Customer 3 is “runnable”
     Signature is Completed
      • Customer 1 goes to “runnable”


12
Wait Time Tables (SQL 2000)

          http://support.microsoft.com/kb/822101

                           WaitType – internal binary, 0
     sysprocesses
     loginame              means SPID is on CPU and not
     hostname
     programname
     spid
                           waiting
     dbid
     waittype
     waittime
                           LastWaitType – string value
     lastwaittype
     waitresource          WaitTime – ms of wait for
     sql_handle
     stmt_start
     stmt_end
                           current waittype
     cmd
                           WaitResource – more details
                           about what is being waited on

13
Wait Time Tables (SQL 2005/8)

     http://msdn.microsoft.com/en-us/library/ms188754.aspx

         dm_exec_requests               dm_exec_query_stats
         start_time                     execution_count
         status                         total_logical_writes
         sql_handle                     total_physical_reads
         plan_handle                    total_logical_reads
         start/stop offset
         database_id
         user_id
         blocking_session
         wait_type                      dm_exec_query_plan
         wait_time                      query_plan




         dm_exec_sessions
         login_time
                                       dm_exec_sql_text
         login_name
                                       text
         host_name
         program_name
         session_id


14
DBCC SQLPERF(WAITSTATS)




15
Wait Time Scenario

     Which scenario is worse?
     SQL Statement 1
     • Executed 100 times
     • Caused 10 minutes of wait time for end user
     • Waited 90% of time on “PAGEIOLATCH_SH”
     SQL Statement 2
     • Executed 1 time
     • Caused 10 minutes of wait time for end user
     • Waited 90% on “LCK_M_X”


16
Identify – Simplification

     Break Down SQL Into Simplest Forms
     •   Complex SQL becomes multiple SQL
     •   Sub-Queries Should be Tuned Separately
     •   Tuned SQL in Stored Procedures Separately
     •   Get the definition of views
     •   Understand Distributed Queries




17
Identify – Summary

     Determine the SQL
     Understand End-to-End
     Measure Wait Time
     Simplify Statement




18
Gather - Metrics

     Get baseline metrics
     • How long does it take now
     • What is acceptable (10 sec, 2 min, 1 hour)
     Collect Wait Type Information
     •   Locking / Blocking (LCK)
     •   I/O problem (PAGEIOLATCH)
     •   Latch contention (LATCH)
     •   Network slowdown (NETWORK)
     •   May be multiple issues
     •   All have different resolutions
     Document everything in simple language
19
Gather – Execution Plan

     SQL Server Management Studio
     • Estimated Execution Plan - can be wrong
     • Actual Execution Plan – must execute query, can be
       dangerous in production and also wrong in test
     SQL Server Profiler Tracing
     • Event to collect: MISC: Execution Plan
     • Works when you know a problem will occur
     DM_EXEC_QUERY_PLAN
     • Real execution plan of executed query



20
DM_EXEC_QUERY_PLAN




21
Gather – Bind Values

       <is there something like V$SQL_BIND_CAPTURE>

     SELECT name, position, datatype_string, value_string
     FROM   v$sql_bind_capture
     WHERE sql_id = '15uughacxfh13';

     NAME    POSITION DATATYPE_STRING VALUE_STRING
     ----- ---------- --------------- ------------
     :B1            1 BINARY_DOUBLE

       Bind Values also provided by tracing
        • Level 4 – bind values
        • Level 8 – wait information
        • Level 12 – bind values and wait information



22
Example SQL Statement

       Who registered yesterday for SQL Tuning
     SELECT s.fname, s.lname, r.signup_date
     FROM   student s
     INNER JOIN registration r ON
            s.student_id = r.student_id
     INNER JOIN class c ON
            r.class_id = c.class_id
     WHERE c.name = 'SQL TUNING'
     AND    r.signup_date BETWEEN @BeginDate
                              AND @EndDate
     AND    r.cancelled = 'N'

       Execution Time – 1:30 to execute
       Wait Types – Waits 90% on PAGEIOLATCH_SH
23
Execution Plan




24
Gather - Relationships


     CLASS          REGISTRATION   STUDENT
      class_id       class_id       student_id
      name           student_id     fname
      class_level    signup_date    lname
                     cancelled




25
Gather – Table Information

     Table Definition
     • Where does it physically reside
     • Large columns?
     • Data Profile Viewer – Integration Services
     Existing Indexes
     • Names of all existing indexes
     • Columns those indexes contain




26
Gather – Summary

     Metrics
     • How long does it take currently
     • What does the query wait for (wait types)
     Plan
     • DM_EXEC_QUERY_PLAN
     • Actual Execution Plan
     • Do not use Estimated Plans unless necessary
     Table Relationships
     Table Information
     • Columns and Existing Indexes
27
Tune – Create SQL Diagram
      SQL Tuning – Dan Tow
        • Great book that teaches SQL Diagramming
        • http://www.singingsql.com

                             registration       .04
                             5         30


                         1                  1


                       student           class        .002



     select count(1) from registration where cancelled = 'N'
     and signup_date between '2009-04-08 00:00' and '2009-04-08 23:59'

     3562 / 80000 = .0445

     select count(1) from class where name = 'SQL TUNING'

     2 / 1000 = .002
28
Tune – New Execution Plan
     create index cl_name on class(name)




       Metric – Takes 0:20 to execute
       Why would an Index Scan still occur on REGISTRATION?
29
Gather – Existing Indexes




30
Tune – New Execution Plan

     create index reg_alt on registration(class_id)




       Metric – Takes 0:03 to execute

31
Tune – Better Execution Plan

     create index reg_alt on registration(class_id)
     include (signup_date, cancelled)




       Metric – Takes 0:01.8 to execute
32
Tune – Alternative from SSMS
     create index reg_can on registration(cancelled, signup_date)
     include (class_id, student_id)




       Metric – Takes 0:08 to execute

33
Monitor

     Monitor the improvement
      •   Be able to prove that tuning made a difference
      •   Take new metric measurements
      •   Compare them to initial readings
      •   Brag about the improvements – no one else will
     Monitor for next tuning opportunity
      • Tuning is iterative
      • There is always room for improvement
      • Make sure you tune things that make a difference
     Shameless Product Pitch - Ignite

34
Ignite for SQL Server




                            40%
                        Improvement




35
Summary

     Identify
     •   What is the Bottleneck
     •   End-to-End view of performance
     •   Simplify
     Gather
     •   Metrics – Current Performance
     •   Wait Time
     •   Execution Plan
     •   Object Definitions and Statistics
     Tune
     •   SQL Diagrams – Dan Tow
     Monitor
     •   New Metrics, Wait Time Profile, Execution Plan

36
Confio Software

     Wait-Based Performance Tools
     Igniter Suite
     • Ignite for SQL Server, Oracle, DB2, Sybase
     Provides Help With
     • Identify
     • Gather
     • Monitor
     Based in Colorado, worldwide customers
     Free trial at www.confio.com

37
To learn more or inquire about speaking opportunities, please contact:

                Mark Ginnebaugh, User Group Leader
                      mark@designmind.com

Weitere ähnliche Inhalte

Was ist angesagt?

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning BaselineSQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline► Supreme Mandal ◄
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Carlos Sierra
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsAnil Nair
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle ArchitectureNeeraj Singh
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuningngupt28
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql serverDivya Sharma
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuningJugal Shah
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWRpasalapudi
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
Oracle architecture ppt
Oracle architecture pptOracle architecture ppt
Oracle architecture pptDeepak Shetty
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 ToolCarlos Sierra
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningYogiji Creations
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 

Was ist angesagt? (20)

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning BaselineSQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Oracle ASM Training
Oracle ASM TrainingOracle ASM Training
Oracle ASM Training
 
Postgresql
PostgresqlPostgresql
Postgresql
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql server
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Analyzing and Interpreting AWR
Analyzing and Interpreting AWRAnalyzing and Interpreting AWR
Analyzing and Interpreting AWR
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
Oracle architecture ppt
Oracle architecture pptOracle architecture ppt
Oracle architecture ppt
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 Tool
 
AWR Sample Report
AWR Sample ReportAWR Sample Report
AWR Sample Report
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 

Andere mochten auch

Performance tuning and optimization (ppt)
Performance tuning and optimization (ppt)Performance tuning and optimization (ppt)
Performance tuning and optimization (ppt)Harish Chand
 
SQL Server Query Tuning Tips - Get it Right the First Time
SQL Server Query Tuning Tips - Get it Right the First TimeSQL Server Query Tuning Tips - Get it Right the First Time
SQL Server Query Tuning Tips - Get it Right the First TimeDean Richards
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowKevin Kline
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceVinod Kumar
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
Database Performance Tuning Introduction
Database  Performance Tuning IntroductionDatabase  Performance Tuning Introduction
Database Performance Tuning IntroductionMyOnlineITCourses
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning Arno Huetter
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureKevin Kline
 
Sql server performance Tuning
Sql server performance TuningSql server performance Tuning
Sql server performance TuningSimon Huang
 
التحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجالتحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجbosy sadek
 
Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Abdullatif Tarakji
 
MarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine
 
Oracle hard and soft parsing
Oracle hard and soft parsingOracle hard and soft parsing
Oracle hard and soft parsingIshaan Guliani
 
Lesson5 Print and export databases
Lesson5 Print and export databases Lesson5 Print and export databases
Lesson5 Print and export databases Abdullatif Tarakji
 
الوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاالوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاAmin Abu Hammad
 
Performance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabasePerformance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabaseGrant Fritchey
 

Andere mochten auch (20)

Performance tuning and optimization (ppt)
Performance tuning and optimization (ppt)Performance tuning and optimization (ppt)
Performance tuning and optimization (ppt)
 
SQL Server Query Tuning Tips - Get it Right the First Time
SQL Server Query Tuning Tips - Get it Right the First TimeSQL Server Query Tuning Tips - Get it Right the First Time
SQL Server Query Tuning Tips - Get it Right the First Time
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
Database Performance Tuning Introduction
Database  Performance Tuning IntroductionDatabase  Performance Tuning Introduction
Database Performance Tuning Introduction
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
Microsoft SQL Server internals & architecture
Microsoft SQL Server internals & architectureMicrosoft SQL Server internals & architecture
Microsoft SQL Server internals & architecture
 
Sql server performance Tuning
Sql server performance TuningSql server performance Tuning
Sql server performance Tuning
 
التحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالجالتحدى 6 الإستعلام بطريقة المعالج
التحدى 6 الإستعلام بطريقة المعالج
 
Lesson11 Create Query
Lesson11 Create QueryLesson11 Create Query
Lesson11 Create Query
 
Trabalho fitos digitais
Trabalho fitos digitaisTrabalho fitos digitais
Trabalho fitos digitais
 
Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases Lesson4 Protect and maintain databases
Lesson4 Protect and maintain databases
 
Lesson8 Manage Records
Lesson8 Manage RecordsLesson8 Manage Records
Lesson8 Manage Records
 
MarketLine Country Statistics Database
MarketLine Country Statistics DatabaseMarketLine Country Statistics Database
MarketLine Country Statistics Database
 
Oracle hard and soft parsing
Oracle hard and soft parsingOracle hard and soft parsing
Oracle hard and soft parsing
 
Chapter 11new
Chapter 11newChapter 11new
Chapter 11new
 
Lesson5 Print and export databases
Lesson5 Print and export databases Lesson5 Print and export databases
Lesson5 Print and export databases
 
الوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتهاالوحدة التاسعة - قاعدة البيانات وادارتها
الوحدة التاسعة - قاعدة البيانات وادارتها
 
Performance Tuning Azure SQL Database
Performance Tuning Azure SQL DatabasePerformance Tuning Azure SQL Database
Performance Tuning Azure SQL Database
 

Ähnlich wie SQL Server Tuning to Improve Database Performance

Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMark Ginnebaugh
 
Advanced tips for making Oracle databases faster
Advanced tips for making Oracle databases fasterAdvanced tips for making Oracle databases faster
Advanced tips for making Oracle databases fasterSolarWinds
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsZohar Elkayam
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1SolarWinds
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowDean Richards
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001jucaab
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfElboulmaniMohamed
 
Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Eduardo Castro
 
SQL Server Performance Analysis
SQL Server Performance AnalysisSQL Server Performance Analysis
SQL Server Performance AnalysisEduardo Castro
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportAlfredo Krieg
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1Navneet Upneja
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502kaziul Islam Bulbul
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - PresentationBiju Thomas
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerMaris Elsins
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting forJason Strate
 
Wait Watchers ; Gain SQL Performance Increases Fast!
Wait Watchers; Gain SQL Performance Increases Fast!Wait Watchers; Gain SQL Performance Increases Fast!
Wait Watchers ; Gain SQL Performance Increases Fast!Richard Douglas
 
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdfyishengxi
 
261197832 8-performance-tuning-part i
261197832 8-performance-tuning-part i261197832 8-performance-tuning-part i
261197832 8-performance-tuning-part iNaviSoft
 

Ähnlich wie SQL Server Tuning to Improve Database Performance (20)

Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query Tuning
 
Advanced tips for making Oracle databases faster
Advanced tips for making Oracle databases fasterAdvanced tips for making Oracle databases faster
Advanced tips for making Oracle databases faster
 
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAsOracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
 
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdf
 
Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008Ajuste (tuning) del rendimiento de SQL Server 2008
Ajuste (tuning) del rendimiento de SQL Server 2008
 
SQL Server Performance Analysis
SQL Server Performance AnalysisSQL Server Performance Analysis
SQL Server Performance Analysis
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
 
DB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource ManagerDB12c: All You Need to Know About the Resource Manager
DB12c: All You Need to Know About the Resource Manager
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting for
 
Wait Watchers ; Gain SQL Performance Increases Fast!
Wait Watchers; Gain SQL Performance Increases Fast!Wait Watchers; Gain SQL Performance Increases Fast!
Wait Watchers ; Gain SQL Performance Increases Fast!
 
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
22-4_PerformanceTuningUsingtheAdvisorFramework.pdf
 
My C.V
My C.VMy C.V
My C.V
 
261197832 8-performance-tuning-part i
261197832 8-performance-tuning-part i261197832 8-performance-tuning-part i
261197832 8-performance-tuning-part i
 

Mehr von Mark Ginnebaugh

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Mark Ginnebaugh
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Mark Ginnebaugh
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataMark Ginnebaugh
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMark Ginnebaugh
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerMark Ginnebaugh
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsMark Ginnebaugh
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Mark Ginnebaugh
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMark Ginnebaugh
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopMark Ginnebaugh
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMark Ginnebaugh
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Mark Ginnebaugh
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMark Ginnebaugh
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Mark Ginnebaugh
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012Mark Ginnebaugh
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Mark Ginnebaugh
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesMark Ginnebaugh
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Mark Ginnebaugh
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMark Ginnebaugh
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMark Ginnebaugh
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMark Ginnebaugh
 

Mehr von Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Kürzlich hochgeladen

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

SQL Server Tuning to Improve Database Performance

  • 1. Tuna Helper For SQL Server DBAs Speaker: Dean Richards Senior DBA, Confio Software San Francisco SQL Server User Group April 2010 Mark Ginnebaugh, User Group Leader, mark@designmind.com
  • 2. Tuna Helper Proven Process for SQL Tuning Dean Richards Senior DBA, Confio Software 2
  • 3. Tuna Helper – Proven Process for SQL Tuning Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Chinese Proverb 3
  • 4. Who Am I? Senior DBA for Confio Software • DeanRichards@confio.com Current – 20+ Years in SQL Server & Oracle • DBA and Developer Specialize in Performance Tuning Review Performance of 100’s of Databases for Customers and Prospects Common Thread – Paralyzed by Tuning 4
  • 5. Agenda Introduction Challenges Identify - Which SQL and Why Gather – Details about SQL Tune – Case Study Monitor – Make sure it stays tuned 5
  • 6. Introduction Tuning is Hard This Presentation is an Introduction • 3-5 day detailed classes are typical Providing a Framework • Helps develop your own processes • There is no magic tool • Tools cannot reliably tune SQL statements • Tuning requires the involvement of you and other technical and functional members of team 6
  • 7. Challenges Requires Expertise in Many Areas • Technical – Plan, Data Access, SQL Design • Business – What is the Purpose of SQL? Tuning Takes Time • Large Number of SQL Statements • Each Statement is Different Low Priority in Some Companies • Vendor Applications • Focus on Hardware or System Issues 7
  • 8. Identify – End-to-End Business Aspects • Who registered yesterday for SQL Tuning • Why does the business need to know this • How often is the information needed • Who uses this information Technical Information • Review ERD • Understand tables and the data (at a high level) End-to-End Process • Understand application architecture • What portion of the total time is database • Where is it called from in the application 8
  • 10. Identify – Which SQL User / Batch Job Complaints Tracing a Session / Process Queries Performing Most I/O (LIO, PIO) Queries Consuming CPU Queries Doing Table or Index Scans Known Poorly Performing SQL Highest Response Times (Wait Types) SELECT sql_handle, statement_start_offset, statement_end_offset, plan_handle, execution_count, total_logical_reads, total_physical_reads, total_elapsed_time, st.text FROM sys.dm_exec_query_stats AS qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st ORDER BY total_elapsed_time DESC 10
  • 11. Measure Response/Wait Time Focus on End User Response Time Understand the total time a Query spends in Database Measure time while Query executes SQL Server helps by providing Wait Types 11
  • 12. Banking Analogy Tellers are the CPUs Customers being helped are “running” Customers waiting in line are “runnable” Customer 1 Requires Higher Level Signature • Customer 1 “waits” on “Signature” • Customer 2 is checked out, i.e. “running” • Customer 3 is “runnable” Signature is Completed • Customer 1 goes to “runnable” 12
  • 13. Wait Time Tables (SQL 2000) http://support.microsoft.com/kb/822101 WaitType – internal binary, 0 sysprocesses loginame means SPID is on CPU and not hostname programname spid waiting dbid waittype waittime LastWaitType – string value lastwaittype waitresource WaitTime – ms of wait for sql_handle stmt_start stmt_end current waittype cmd WaitResource – more details about what is being waited on 13
  • 14. Wait Time Tables (SQL 2005/8) http://msdn.microsoft.com/en-us/library/ms188754.aspx dm_exec_requests dm_exec_query_stats start_time execution_count status total_logical_writes sql_handle total_physical_reads plan_handle total_logical_reads start/stop offset database_id user_id blocking_session wait_type dm_exec_query_plan wait_time query_plan dm_exec_sessions login_time dm_exec_sql_text login_name text host_name program_name session_id 14
  • 16. Wait Time Scenario Which scenario is worse? SQL Statement 1 • Executed 100 times • Caused 10 minutes of wait time for end user • Waited 90% of time on “PAGEIOLATCH_SH” SQL Statement 2 • Executed 1 time • Caused 10 minutes of wait time for end user • Waited 90% on “LCK_M_X” 16
  • 17. Identify – Simplification Break Down SQL Into Simplest Forms • Complex SQL becomes multiple SQL • Sub-Queries Should be Tuned Separately • Tuned SQL in Stored Procedures Separately • Get the definition of views • Understand Distributed Queries 17
  • 18. Identify – Summary Determine the SQL Understand End-to-End Measure Wait Time Simplify Statement 18
  • 19. Gather - Metrics Get baseline metrics • How long does it take now • What is acceptable (10 sec, 2 min, 1 hour) Collect Wait Type Information • Locking / Blocking (LCK) • I/O problem (PAGEIOLATCH) • Latch contention (LATCH) • Network slowdown (NETWORK) • May be multiple issues • All have different resolutions Document everything in simple language 19
  • 20. Gather – Execution Plan SQL Server Management Studio • Estimated Execution Plan - can be wrong • Actual Execution Plan – must execute query, can be dangerous in production and also wrong in test SQL Server Profiler Tracing • Event to collect: MISC: Execution Plan • Works when you know a problem will occur DM_EXEC_QUERY_PLAN • Real execution plan of executed query 20
  • 22. Gather – Bind Values <is there something like V$SQL_BIND_CAPTURE> SELECT name, position, datatype_string, value_string FROM v$sql_bind_capture WHERE sql_id = '15uughacxfh13'; NAME POSITION DATATYPE_STRING VALUE_STRING ----- ---------- --------------- ------------ :B1 1 BINARY_DOUBLE Bind Values also provided by tracing • Level 4 – bind values • Level 8 – wait information • Level 12 – bind values and wait information 22
  • 23. Example SQL Statement Who registered yesterday for SQL Tuning SELECT s.fname, s.lname, r.signup_date FROM student s INNER JOIN registration r ON s.student_id = r.student_id INNER JOIN class c ON r.class_id = c.class_id WHERE c.name = 'SQL TUNING' AND r.signup_date BETWEEN @BeginDate AND @EndDate AND r.cancelled = 'N' Execution Time – 1:30 to execute Wait Types – Waits 90% on PAGEIOLATCH_SH 23
  • 25. Gather - Relationships CLASS REGISTRATION STUDENT class_id class_id student_id name student_id fname class_level signup_date lname cancelled 25
  • 26. Gather – Table Information Table Definition • Where does it physically reside • Large columns? • Data Profile Viewer – Integration Services Existing Indexes • Names of all existing indexes • Columns those indexes contain 26
  • 27. Gather – Summary Metrics • How long does it take currently • What does the query wait for (wait types) Plan • DM_EXEC_QUERY_PLAN • Actual Execution Plan • Do not use Estimated Plans unless necessary Table Relationships Table Information • Columns and Existing Indexes 27
  • 28. Tune – Create SQL Diagram SQL Tuning – Dan Tow • Great book that teaches SQL Diagramming • http://www.singingsql.com registration .04 5 30 1 1 student class .002 select count(1) from registration where cancelled = 'N' and signup_date between '2009-04-08 00:00' and '2009-04-08 23:59' 3562 / 80000 = .0445 select count(1) from class where name = 'SQL TUNING' 2 / 1000 = .002 28
  • 29. Tune – New Execution Plan create index cl_name on class(name) Metric – Takes 0:20 to execute Why would an Index Scan still occur on REGISTRATION? 29
  • 30. Gather – Existing Indexes 30
  • 31. Tune – New Execution Plan create index reg_alt on registration(class_id) Metric – Takes 0:03 to execute 31
  • 32. Tune – Better Execution Plan create index reg_alt on registration(class_id) include (signup_date, cancelled) Metric – Takes 0:01.8 to execute 32
  • 33. Tune – Alternative from SSMS create index reg_can on registration(cancelled, signup_date) include (class_id, student_id) Metric – Takes 0:08 to execute 33
  • 34. Monitor Monitor the improvement • Be able to prove that tuning made a difference • Take new metric measurements • Compare them to initial readings • Brag about the improvements – no one else will Monitor for next tuning opportunity • Tuning is iterative • There is always room for improvement • Make sure you tune things that make a difference Shameless Product Pitch - Ignite 34
  • 35. Ignite for SQL Server 40% Improvement 35
  • 36. Summary Identify • What is the Bottleneck • End-to-End view of performance • Simplify Gather • Metrics – Current Performance • Wait Time • Execution Plan • Object Definitions and Statistics Tune • SQL Diagrams – Dan Tow Monitor • New Metrics, Wait Time Profile, Execution Plan 36
  • 37. Confio Software Wait-Based Performance Tools Igniter Suite • Ignite for SQL Server, Oracle, DB2, Sybase Provides Help With • Identify • Gather • Monitor Based in Colorado, worldwide customers Free trial at www.confio.com 37
  • 38. To learn more or inquire about speaking opportunities, please contact: Mark Ginnebaugh, User Group Leader mark@designmind.com