12 Steps to SQL Server Query Performance Tuning

6
12 Steps to SQL Server Query Performance Tuning Thomas LaRock Technical Evangelist and Senior DBA Confio Software 01/17/2022 1

description

Get the full 12-step approach from Tom LaRock, Senior Confio DBA and MVP.

Transcript of 12 Steps to SQL Server Query Performance Tuning

Page 1: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 1

12 Steps to SQL Server Query Performance Tuning

Thomas LaRockTechnical Evangelist and Senior DBA

Confio Software

Page 2: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 2

Step 1: Tables and Rowcounts

• Are you certain they are tables?– Views– Table valued functions

• Are you certain about the rowcounts?– Agile development

Page 3: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 3

Step 2: Find All Filters

• Examine WHERE and JOIN clauses– Filtered rowcounts

• Bad signs– No filters– Majority of table returned

Page 4: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 4

Step 3: Selectivity

• Want to know the size of the actual logical sets we are working with

• Most useful for RIGHT, LEFT, OUTER• When is the predicate applied?

Page 5: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 5

Step 4: Analyze Query Columns

• Looking for ‘*’ or scalar functions– Performance degraders (and risks)

• CASE, CAST, CONVERT• Sub-queries• SARG-able

Page 6: 12 Steps to SQL Server Query Performance Tuning

04/12/2023 6

Learn the 12 Step Approach Now

Get the full 12-step approach from Tom LaRock, Senior Confio DBA and MVP, at www.confio.com.