SQL Server query hints execution plan – Part1
Hi Friends, Today we are going to discuss on SQL Server query hints execution plan. Let us consider following SQL statement;USE [AdventureWorks2012] SELECT * FROM Sales.SalesOrderDetail ORDER BY...
View ArticleSQL Server query hints execution plan – Part2
Hi Friends, Welcome to the Part2 of SQL Server query hints execution plan and you can read Part1 by clicking here. Let us start with a simple query. In the example below we have a GROUP BY clause that...
View ArticleSQL Server query hints execution plan – Part3
Hi Geeks, Welcome to the Part3 of SQL Server query hints execution plan. You can read last two posts by clicking Part1 and Part2. Today we are going to see how we can control union operations in...
View ArticleSQL Server expand views hint and execution plan
Hi Geeks, Today I will be talking about SQL Server expand views hint and its impact on execution plan. We will create an indexed view first then dive into the topic.--USE [AdventureWorks2012] --Step 1...
View ArticleSQL Server plan guide and execution plan
Hi Geeks, Think of a situation when you want to apply query hint to a query that is part of application code but development team is unwilling to touch application code. Does this mean there is no way...
View ArticleOPTIMIZE FOR query hint in SQL Server
Hi Geeks, Many of us might have experienced that a query runs perfect for long time then suddenly it started performing very bad with no clues. After lot of investigation, we find that parameter that...
View ArticleSQL Server narrow plans (per-row)
Hi Friends, When we update any data which has to modify and update existing non-clustered index using per row is also known as SQL Server narrow plans. In per row operations (narrow plans) the updates...
View ArticleParameter sniffing in SQL Server
Hi Friends, SQL Server uses histograms from statistics objects to estimate cardinality of a query and this helps SQL Server to produce an optimal execution plan. Query optimizer has to inspect values...
View ArticleSQL Server optimize for unknown and local variables
Hi Geeks, In my previous blog post we saw how parameter sniffing could negatively impact any query performance when SQL Server query optimizer decides to sniff parameters. There are different ways that...
View ArticleAuto parameterization in SQL Server
Dear Friends, Today we are going understand auto parameterization in SQL Server. In simple words SQL Server query optimizer may return the same plan in the cases where it doesn’t matter which parameter...
View Article