Tips, Tricks, and Advice from the SQL Server Query Processing Team

The query processing team - query optimization & execution - providing tips, tricks, advice and answers to freqeuently-asked questions in a continued effort to make your queries run faster and smoother in SQL Server.

Browse by Tags

Tagged Content List
  • Blog Post: Understanding SQL server memory grant

    This article describes how query memory grant works in Microsoft SQL Server. It applies to both SQL2005 and SQL2008. Written by Jay Choe, Microsoft SQL Server Engine. -------------------------------------------------------------------------------- Query memory grant (a.k.a. query work buffer) is...
  • Blog Post: Store Statistics XML in database tables using SQL Traces for further analysis.

    Since SQL Server 2005, query plan as well as statistics of query execution can be captured in XML format. Also, SQL Server 2005 has XQuery support to directly query XML document. By combining these two new features, users can analyze the query plans using queries. However, in SQL Server, there...
  • Blog Post: How to Check Whether the Final Query Plan is Optimized for Star Join Queries?

    The star join optimization technique is an index based optimization designed for data warehousing scenarios to make optimal use of non-clustered indexes on the huge fact tables. The general idea is to use the non-clustered indexes on the fact table to limit the number of rows scanned from it. More details...
  • Blog Post: Hash Warning SQL Profiler Event

    One of the less well-known warning events that is logged to SQL Profiler trace is the Hash Warning event . Hash Warning events are fired when a hash recursion or hash bailout has occurred during a hashing operation. Both of these situations are less than desirable, as they mean that a Hash Join or Hash...
  • Blog Post: Using ETW for SQL Server 2005

    ETW stands for “Event Tracing for Windows” and it is used by many Windows applications to provide debug trace functionality. This “wide” availability is a key point of using ETW because it can help to track certain activities from end to end. For example, you can literally track a request coming from...
  • Blog Post: Intro to Query Execution Bitmap Filters

    One of the least understood Query Execution operators is the Bitmap . I'd like to give a fairly brief overview of how Bitmap filters are used, as well as some technical details about their limitations and functionality. Bitmap filters are often mistaken as Bitmap indexes . The two are actually very distinct...
  • Blog Post: Statistics Profile Output Formatting

    Statistics profile output is an important tool when it comes to troubleshooting query plan issues. When enabled, it returns a textual representation of the query plan with a lot of detail about cost and cardinality estimates as well as actual counts. When working in SQL Server management Studio...
  • Blog Post: Showplan Trace Events

    Besides SSMS, another great tool available to database developers and DBAs to view query plans and troubleshoot query compilation or execution issues is the SQL Server Profiler. In the Profiler, all the showplan events are listed under the Performance Event category. All the SQL Trace events generate...
  • Blog Post: Viewing and Interpreting XML Showplans

    As mentioned in our previous blog posting, SQL Server 2005 supports Showplan generation in XML format. XML-based Showplans provide greater flexibility in viewing query plans and saving them to files as compared to legacy Showplans. In addition to the usability benefits, XML-based Showplans also contain...
  • Blog Post: Introduction to Showplan

    Showplan is a feature in SQL Server to display and read query plans. While some of you may already be very familiar with Showplan, it is one of the most important diagnostic tools that we use in the query processing team to locate and identify problems, and therefore deserves some extra exposure. Being...
  • Blog Post: Compilation Time Issues in OLTP Applications When Upgrading to SQL 2005

    I've helped a lot of people upgrade their SQL 2000 applications to SQL 2005. While many of these upgrades go well, occasionally some applications have issues and the overall workload may perform more poorly after the upgrade. One area where I've seen issues is with ad-hoc on-line transaction processing...
Page 1 of 1 (11 items)