This website uses cookies to ensure you get the best experience on our website. Learn more

SQL Server Performance Tuning and Query Optimization


execution plan in sql server | Sql server performance tuning Part 3

Graphical Execution Plan Icons:


Find Us On YouTube- Subscribe Channel to watch Database related videos

For Quiz-

Find Us On FaceBook-

SQL Server Performance Tuning Made Easy

SQL Server Performance Tuning is still a mystery to many. Quite often even an experienced SQL Server DBA, often gets confused as to how to figure out where to start with this entire process. In this module we are going to learn about how to get started with SQL Server Performance Tuning. We will go over some very important scripts which will help us to get started with the SQL Server Performance Tuning exercise. At the end of the session the author will share his three important scripts which he uses at his customer sites all the time.

Pinal Dave has been a part of the industry for more than eleven years. During his career he has worked both in India and the US, mostly working with SQL Server Technology – right from version 6.5 to its latest form. Pinal has worked on many performance tuning and optimization projects for high transactional systems. He received his Master of Science from the University of Southern California and a Bachelors of Engineering from Gujarat University. Additionally, he holds many Microsoft certificates. He has been a regular speaker at many international events like TechEd, SQL PASS, MSDN, TechNet and countless user groups.

Pinal writes frequently writes on his blog on various subjects regarding SQL Server technology and Business Intelligence. His passion for the community drives him to share his training and knowledge. His previous experience includes Technology Evangelist at Microsoft and Sr. Consultant at SolidQ. Prior to joining Microsoft he was awarded the Microsoft MVP award for three continuous years for his outstanding community service and evangelizing SQL Server technology. He was also awarded the Community Impact Award – Individual Contributor.
Links to PASS and our Site:



Why to Go:

Use our discount code VGDISM843 to save $150.00 off the full price of PASS

Registration can be completed here:

SQL Server Query Tuning Best Practices - Part 1

SQL Server MVPs Aaron Bertrand and Kevin Kline begin their series on query tuning best practices. They go over some tips and tricks for writing queries. First, Kevin goes over query tuning methodology and what is needed to measure query performance. Then, Aaron discusses Default Cursors, Correlated Sub-Queries, and Not In.

Find more information about our products:
Plan Explorer:

SQL Server Interview | How to approach analysis if sql server started running really slow

SQL Server Interview Question Answer
All the sudden, users start complaining that the SQL Server is running slow. What steps you would take to analysis the problem?

Complete List of SSIS Interview Questions by Tech Brothers

How To Troubleshoot a Slow Running Query in SQL Server Extended Events & Wait Stats (by Amit Bansal)

In this video, you will understand how to track waits stats for a given query/session using Extended Events.

Suggest us topics that you wish to learn through our videos:

Learn about Amit Bansal’s ultimate video course on SQL Server Performance Tuning:

Stay Connected with Amit Bansal and subscribe to the exclusive list of his session attendees (conference and pre-cons), class participants & video viewers. You will get just one email in two weeks with good links to continue your learning.

Also, you can join ‘SQLMaestros Champs’ Telegram group and participate in SQL Server discussions. It’s a forum for SQL Server lovers -

If you work on other technologies in MS Data + AI Stack, join this group:

Video resources including presentation, demo files, code snippets and more learning material is available on (Join for free and access all the resources)

Connect With The Speaker (Amit Bansal)
-Follow on Twitter:
-Follow on FaceBook at
-Follow on LinkedIN:
-Facebook Page:

Connect with SQLMaestros:
- Email us:

Data Platform Summit
Asia's largest learning event on AI, Data & Advanced Analytics.

SQLMaestros Video Courses
Amit Bansal’s popular SQL Performance Tuning course is now going live in video format.
SQLMaestros Hands-On-Labs
Want to practice SQL, Azure & BI concepts, step-by-step with exercises, screenshots, instructions & explanations? Get access to 100+ labs covering the entire Microsoft Data Platform stack. Try SQLMaestros Hands-On-Labs – the new way of practical, self-paced learning. Anytime. Anywhere.


SQLMaestros Learning Kits
The kit comprises of PowerPoint presentations, lab manuals, workbook & instructor demos & notes. The kit is based on Amit Bansal’s Performance Tuning Master Class.
SQL Server Health Check
If your SQL Server deployments are not performing good or if you have seen early signs of performance degradation, SQLMaestros can help you with a thorough health check.

Have technical questions?

Join the largest SQL group on FB

Our LinkedIn group

Our Telegram group on mobile

DataPlatformGeeks (DPG) Community
Join the fastest growing community of data & analytics professionals

Why Join DPG?

-Attend all events hosted by DPG, including SQLMaestros Special Events
-Get access to free videos, labs, magazines and host of learning resources
-Download all events & conference material
-Learn new skills. Sharpen existing skills
-Be part of Asia’s Largest Data/Analytics Community
-Opportunity to be a regional mentor & speaker at our events
-Immense technical & professional development

If you wish to speak at DataPlatformGeeks events, fill out this form:

If you wish to become a Regional Mentor with DataPlatformGeeks, fill out this form:

Watch all recorded DPG webinars here:

SQL Complex Queries , Query Optimization and Interview Questions SQLServer 2016

In above lecture new SQL Server 2012 - SQL Server 2016 TSQL features are covered. Eg:
1. Running total using SUM and OVER operator
2. Lead and Lag
3. First_Value and Last_Value
5. IIF
6. Choose
7. Dense Tank
8. Interview Questions
9. Query optimization or Performance tuning
Link for script and backup file:

24HoP - 7 Tips to Performance Tuning, Optimization, and Everything - Pinal Dave

Performance Tuning - SQL Server - SET NOCOUNT ON

Write an email to for SQL server ONLINE training
SQL Server Performance tuning and query optimization
Procedure performance
SET options in SQL server

what is query optimizer | query optimizer in sql server | Sql server performance tuning part 4



Sql server performance tuning interview question and answers

Find Us On YouTube- Subscribe Channel to watch Database related videos

For Quiz-

Find Us On FaceBook-

SQL Server Performance Tuning Step by Step 1

SQL Server Performance tuning, introduction to sql performance tuning

SQL Server Performance Tuning Step by Step 3

Improve SQL Server performance using profiler and tuning advisor

For more such videos visit
For more such videos subscribe

See our other Step by Step video series below :-
Learn Data Science in 1 hour :-
Learn Power BI Step by Step:-
Learn MSBI Step by Step in 32 hours:-
Learn Tableau step by step :-
Learn SQL Server Step by Step
Learn Angular tutorial step by step
Learn MVC Core step by step :-
Learn C# Step by Step
Learn Design Pattern Step by Step
Learn SharePoint Step by Step in 8 hours:-

This video first starts with a simple explanation of what is a SQL server profiler and performance tuning wizard. After completing the basic concepts it then demonstrates a simple example using two tables by capturing the work load and understanding the recommendations given by the tuning wizard.
For more such videos visit

We are also distributing a 100 page Ebook Sql Server Interview Questions. If you want this ebook please share this video in your facebook/twitter/linkedin account and email us on with the shared link and we will email you the PDF.

SQL Server Performance Tuning and Query Optimization | Sql Server Interview Question Part 01 | sql


Find Us On YouTube- Subscribe Channel to watch Database related videos

For Quiz-

Find Us On FaceBook-

10 Query Tuning Techniques Every SQL Programmer Should Know

Kevin Kline
Aaron Bertrand

12 Ways To Rewrite SQL Queries for Better Performance

In this episode we explore a variety of ideas for rewriting queries to improve performance when you can't do things like change server settings or modify indexes.

Subscribe and turn on notifications to never miss a weekly video:

Read the full post with examples:

Follow me on Twitter:

Microsoft SQL Server Performance Tuning, Live

Brent's session at Microsoft Ignite 2015 in Chicago. He covers trace flag 4199, columnstore indexes, scaling out to AG secondaries, Cardinality Estimator changes, delayed durability, in-memory OLTP, Buffer Pool Extensions, and more.

SQL Server Performance Tuning and Query Optimization

SQL performance tuning and query optimization using execution plan

Performance tuning begins with understanding execution plan and finding & fixing expensive operators one by one in below flow:

First Lazy spool: Lazy spool is most expensive operator among all, which happens because of duplicate aggregation. We can remove duplicate aggregation by temporary tables, cte, etc.

Second Hash match: which is always because of unsorted data. Which means either missing index or indexes are not properly utilized, which can be because of :
1. function use in join or where condition
2. First column of existing index is not part of where clause or join
We can address this by adding new index, fixing query to utilize existing index or altering index to new filter configurations.

Keylookup: Keylookup just indicate, that index is missing some data. We can easily resolve it by adding missing column to index key or include part. But there is a catch as, we don't have privilege to alter index all the time. So, some times, we cannot avoid keylookup.

Index Suggestion:
Index key columns are the one which are part of where clause or joins.
Index include columns are the one which are part of only selection.

Partition Elimination: we check if partition are getting eliminated in query or not. As sometimes even tables have partitions still query go for scan instead partition elimination.

A lot of times, I have seen, developer use different datatype in storedprocedure parameters which don't match to actual column. And end up in no partition elimination.

Two reasons why query is not eliminating partition:
1. Data type mismatch or function used on where clause or type casting
2. Partition key column is not part of where clause

BAD Views: Views sometimes becomes bad when developer don't alter them instead they join same table to view which is already part of view to get some extra data. Instead they should write new view or alter existing view to get extra columns

Minimizing sub queries: We can minimize sub queries, if subquries belong to same table to get different column using cross apply or outer apply.
Example we have to get most recent orderdate, order amount, order shipped date, etc for each customer. So instead of writing different sub query for each column, we can use cross apply or outer apply to get data in single query.

Pinal Dave - SQL Server Performance Tuning Made Easy

Every new release of SQL Server brings a whole load of new features that an administrator can add to their arsenal of efficiency. SQL Server 2016 / 2017 has introduced many new features. In this 55 minute session, we will be learning quite a few of the new features of SQL Server 2016 / 2017. Here is the glimpse of the features we will cover in this session. - Captured Live on Ustream at

SQL Server Performance Tuning and Query Optimization

Video talks about
SQL Server Performance Tuning and Query Optimization

Efficient SQL server schema design.
Indexes Fine Tuning.
Queries Optimization.
Build efficient stored procedures.
Efficient transactions

For more SQL Server , SSIS,SSAS and SSRS Videos
Please check the below channel ....

Part of SQL Server Interview Questions and Answers..

Please subscribe for more videos ...

MSBI Opportunities/Jobs and Packages

Please watch and subscribe for more videos..

Top Procedure Interview questions in SQL Server?????

Please watch and subscribe for more videos.....

What are the top SQL Query Interview Questions ?????

Please watch and subscribe for more videos..





Check Also