Quantcast
Channel: Tips, Tricks, and Advice from the SQL Server Query Processing Team
Browsing index pages (25 articles)

Image may be NSFW.
Clik here to view.

Mystery of memory fraction in Showplan XML

If you examine Showplan XML, you may find an entry like  <MemoryFractions Input="1" Output="1" /> on some operators .  They are internal parameters used by query memory grant to save overall...

View Article


Image may be NSFW.
Clik here to view.

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....

View Article


Image may be NSFW.
Clik here to view.

Understanding SQL Server Fast_Forward Server Cursors

SQL Server's server cursor model is a critical tool to many application writers.  Fast_forward cursors are very popular as an alternative to read_only forward_only cursors, but their inner workings are...

View Article

Image may be NSFW.
Clik here to view.

Distinct Aggregation Considered Harmful

Distinct aggregation (e.g. select count(distinct key) …) is a SQL language feature that results in some very slow queries.  It’s particularly frustrating that you can take a perfectly efficient query...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article


Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 4-2: Offline Serial/Parallel...

Source PartitionedWhile the table is partitioned, we may want to change the way it is partitioned when building the new index. For example, by using the same partition function and scheme, the new...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 4-1: Offline Serial/Parallel...

Recall that in the previous posts on index build, we defined "aligned" as the case when base object and in-build index use the same partition schema, and "non-aligned" to be the case when heap and...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article


Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 3: Offline Serial/Parallel...

Aligned partitioned parallel index build   In case of parallel build we scan and sort partitions in parallel and the actual number of sort tables existing at the same time will depends on the actual...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 3: Offline Serial/Parallel...

There are two main categories of partitioned index build: Aligned (when base object and in-build index use the same partition schema) Not- Aligned (when heap and index use different partition schemas...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 2: Offline, Parallel, No...

Build (serial) (write data to the in-build index)                           |                 X (Merge exchange)                            /          |           \                       Sort…...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 2: Offline, Parallel, No Partitioning

The type of parallel index build plan in SQL server depends on whether or not we have a histogram available with necessary statistics. Therefore, there are two broad categories of parallel index plans:...

View Article


Image may be NSFW.
Clik here to view.

Query Execution Timeouts in SQL Server (Part 2 of 2)

Checklist for time out errors   Memory pressure: In most cases timeouts are caused by insufficient memory (i.e. memory pressure). There are different types of memory pressures and it is very important...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Part 1: offline, serial, no partitioning

         Builder (write data to the in-build index)                            |                      Sort (order by index key)                            |                      Scan (read data from...

View Article


Image may be NSFW.
Clik here to view.

Query Execution Timeouts in SQL Server (Part 1 of 2)

This short article provides a checklist for query execution time out errors in Yukon. It does not touch the time out issues on optimization and connection. Before reading this article, you are...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article


Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Introduction (II)

-         Building Partitioned Index vs. Building non-Partitioned Index: The data of partitioned tables and indexes is divided into units that can be spread across more than one filegroup in a...

View Article

Image may be NSFW.
Clik here to view.

Index Build strategy in SQL Server - Introduction (I)

Index Build strategy in SQL Server may vary depending on users needs. Each of these Index Build strategies may have different memory and disc space requirement. These different strategies will be...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article
Browsing index pages (25 articles)


Latest Images