12 Steps to SQL Server Query Performance Tuning
-
Upload
confio-software -
Category
Technology
-
view
521 -
download
5
description
Transcript of 12 Steps to SQL Server Query Performance Tuning
![Page 1: 12 Steps to SQL Server Query Performance Tuning](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/1.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/2.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/3.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/4.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/5.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022012405/55620a60d8b42af2128b47d7/html5/thumbnails/6.jpg)
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.