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 4 (33 total posts)
  • 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
  • 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
  • Why generalizations are dangerous

    A couple of years ago, John Sansom wrote a blog post comparing the performance of two different ways to get the maximum value from a column: MAX() and TOP (1). http://www.johnsansom.com/performance-comparison-of-select-top-1-verses-max/ In the conclusion, he states:  When a clustered index is present on the table & ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on September 15, 2011
  • A demo kit for SQL Sentry Plan Explorer

    Plan Explorer is a free application from SQL Sentry, designed to make execution plan analysis faster and easier. It was developed in response to customer demand for deeper query analysis, but was originally intended only for the paid version of the software. When the team realized how useful the tool could actually be, they decided to give ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on September 13, 2011
  • Can a SELECT query cause page splits?

    Books Online has this to say about page splits: When a new row is added to a full index page, the Database Engine moves approximately half the rows to a new page to make room for the new row.  This reorganization is known as a page split.  A page split makes room for new records, but can take time to perform and is a resource ...
    Posted to Paul White: Page Free Space (Weblog) by Paul White on August 29, 2011
  • SQL Sentry Plan Explorer : New release and an SSMS add-in

    Today we released a new build of SQL Sentry Plan Explorer. The build # is 6.2.34 and you can download it from the usual location. Plan Explorer Changes The updates in this release include the following: A new ''Check for Updates'' feature accessible via the Help menu: Other new additions to the Help menu: Enable/disable the ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on August 3, 2011
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement