THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » Query Plans   (RSS)
Showing page 1 of 4 (32 total posts)
  • Execution Plan Analysis: The Mystery Work Table

    I love SQL Server execution plans. It is often easy to spot the cause of a performance problem just by looking at one. The task is considerably easier if the plan includes run-time information (a so-called ‘actual’ execution plan), but even a compiled plan can be very useful. Nevertheless, there are still times where the execution plan does not ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on March 7, 2013
  • Halloween Protection – The Complete Series

    I have just published a four-part series for SQLPerformance.com on the Halloween Problem. Some of you will never have heard of this issue, and those that have might associate it only with T-SQL UPDATE queries. In fact, the Halloween problem affects execution plans for INSERT, UPDATE, DELETE and MERGE statements. This is a topic I have been ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on February 20, 2013
  • Geek City: Join With Me!

    I remember one of the most surprising changes in SQL Server 2000 2005 was how the graphical plans showed the use of a nonclustered index to seek, and the plan included something that looked like a JOIN to find rows in the base table.  Here’s an example. Although I used SQL Server 2008R2, the graphical plan will be pretty similar to what it ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on February 14, 2013
  • MERGE Bug with Filtered Indexes

    A MERGE statement can fail, and incorrectly report a unique key violation when: The target table uses a unique filtered index; and No key column of the filtered index is updated; and A column from the filtering condition is updated; and Transient key violations are possible Example Tables Say we have ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on December 9, 2012
  • Cardinality Estimation Bug with Lookups

    Estimated row counts on key or RID lookups where a filtering predicate is applied can be wrong in SSMS execution plans.  This error does not affect the optimizer’s ultimate plan selection, but it does look odd.  There are other cases where estimated row counts are inconsistent (for defensible reasons) but the behaviour shown in this post ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on October 15, 2012
  • Why Doesn’t Partition Elimination Work?

    Given a partitioned table and a simple SELECT query that compares the partitioning column to a single literal value, why does SQL Server read all the partitions when it seems obvious that only one partition needs to be examined? Sample Data The following script creates a table, partitioned on the char(3) column ‘Div’, and populates it with ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on September 11, 2012
  • Compute Scalars, Expressions and Execution Plan Performance

    The humble Compute Scalar is one of the least well-understood of the execution plan operators, and usually the last place people look for query performance problems.  It often appears in execution plans with a very low (or even zero) cost, which goes some way to explaining why people ignore it. Some readers will already know that a Compute ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on September 4, 2012
  • Temporary Tables in Stored Procedures

    Ask anyone what the primary advantage of temporary tables over table variables is, and the chances are they will say that temporary tables support statistics and table variables do not.  This is true, of course; even the indexes that enforce PRIMARY KEY and UNIQUE constraints on table variables do not have populated statistics associated with ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on August 14, 2012
  • Parallel Execution Plans Suck

    Summary: A deep dive into SQL Server parallelism, and a potential performance problem with parallel plans that use TOP. There was an interesting question asked by Mark Storey-Smith on dba.stackexchange.com back in October 2011.  He was looking at the execution plan for a query that counts a million rows from a virtual auxiliary table of ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on May 2, 2012
  • Fun with Aggregates

    There are interesting things to be learned from even the simplest queries.  For example, imagine you are given the task of writing a query to list AdventureWorks product names where the product has at least one entry in the transaction history table, but fewer than ten. One possible query to meet that specification is: SELECT ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on March 11, 2012
1 2 3 4 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement