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 2 of 5 (44 total posts)
  • 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
  • Comparing multiple plans in SQL Sentry Plan Explorer

    I’ve seen the question a few times now: “How do I compare two plans side-by-side in Plan Explorer?” Management Studio allows you to view multiple graphical plans that are visible simultaneously, either by generating plans for every statement in a batch, or by generating plans in separate query windows and then splitting the panes. However, at ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on January 6, 2012
  • Forcing a Parallel Query Execution Plan

    This post is for SQL Server developers who have experienced the special kind of frustration, which only comes from spending hours trying to convince the query optimizer to generate a parallel execution plan.  This situation often occurs when making an apparently innocuous change to the text of a moderately complex query; a change which ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on December 22, 2011
  • Is Distinct Aggregation Still Considered Harmful?

    Back in 2008, Marc Friedman of the SQL Server Query Processor Team wrote a blog entry entitled “Distinct Aggregation Considered Harmful”, in which he shows a way to work around the poor performance that often results simply from adding the keyword DISTINCT to an otherwise perfectly reasonable aggregate function in a query.  This post is an ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on December 3, 2011
  • Getting graphical ShowPlans back in SQL Server 2008 R2

    For those of you using the SQL Server 2008 R2 version of Management Studio, and have applied Service Pack 1, you have probably noticed that clicking on a ShowPlan in grid results no longer shows the graphical plan, but rather opens a new window with the raw XML. For example, running the following query: SELECT TOP (5) ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 28, 2011
  • SQL Sentry Plan Explorer v1.3

    On Friday, we published a new version of our free query plan analysis tool, SQL Sentry Plan Explorer. As noted in the change list, we've added a couple of important features. SQL Server 2012 support With a whole slew of changes to the showplan schema in Denali, we've added operators and columns to reflect these changes. For example, you will ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 25, 2011
  • How to Find the Statistics Used to Compile an Execution Plan

    In this post, I show you how to determine exactly which statistics objects were used by the query optimizer to produce an execution plan. Trace Flags We will need three undocumented trace flags.  The first one (3604) is well-known – it redirects trace output to the client so it appears in the SSMS messages tab. The second trace flag is ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on September 20, 2011
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement