Sign In
SQL Programmability & API Development Team Blog
All posts are AS IS, without any further guarantees or warranties.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Misc. Issues
Native Types and Methods
Pages
Procedure Cache
Sorting
SQL CLR Hosting
SQL Exception Handling
SQL Server 2000
SQL Server 2005
XML
Archive
Archives
June 2009
(1)
May 2009
(1)
April 2009
(1)
March 2009
(1)
February 2009
(1)
January 2009
(1)
November 2008
(1)
October 2008
(1)
August 2008
(1)
July 2008
(1)
June 2008
(1)
May 2008
(1)
March 2008
(3)
February 2008
(1)
June 2007
(2)
April 2007
(1)
March 2007
(1)
February 2007
(2)
January 2007
(18)
December 2006
(1)
November 2006
(1)
October 2006
(1)
September 2006
(1)
August 2006
(1)
July 2006
(2)
June 2006
(10)
May 2006
(8)
April 2006
(18)
March 2006
(4)
January, 2007
MSDN Blogs
>
SQL Programmability & API Development Team Blog
>
January, 2007
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
SQL Programmability & API Development Team Blog
4.0 Useful Queries on DMV’s to understand Plan Cache Behavior
Posted
over 5 years ago
by
sangeethashekar
4
Comments
The following queries can be used to understand plan cache behavior. It should be noted that for systems with large plan caches, selecting all rows and joining with sys.dm_exec_sql_text is not recommended. To find the size of the plan cache use: ...
SQL Programmability & API Development Team Blog
3.0 Changes in Caching Behavior between SQL Server 2000, SQL Server 2005 RTM and SQL Server 2005 SP2
Posted
over 5 years ago
by
sangeethashekar
3
Comments
3.1 Costing algorithm change between SQL Server 2000 and SQL Server 2005 RTM In SQL Server 2000 and 2005, the cost of a query depends on 3 factors: number of disk IO requests, number of context switches during query compilation (in 4 ms quantums...
SQL Programmability & API Development Team Blog
2.0 Diagnosing Plan Cache Related Performance Problems and Suggested Solutions
Posted
over 5 years ago
by
sangeethashekar
2
Comments
Plan cache related performance problems usually manifest in decrease in throughput (or increase in query response time), and some times out of memory errors, connection time outs. None of these symptoms however point to plan cache related performance...
SQL Programmability & API Development Team Blog
Trouble Shooting Query Performance Issues Related to Plan Cache in SQL 2005 RTM and SP1
Posted
over 5 years ago
by
sangeethashekar
1
Comments
If after upgrading from SQL 2000 to SQL 2005 RTM and/or SP1, you notice decreased OLTP database application throughput, bloated plan cache or out of memory errors, you will need to gather machine configuration information and system performance data in...
SQL Programmability & API Development Team Blog
12.0 Plan Cache Trace Events and Performance Counters
Posted
over 5 years ago
by
sangeethashekar
1
Comments
12.1 Trace Events 12.1.1 Performance Statistics Trace Event The performance statistics trace event introduced in SQL Server 2005, gives persisted plan and runtime statistics information. With the information part of the trace event data when...
SQL Programmability & API Development Team Blog
11.0 Temporary Tables, Table Variables and Recompiles
Posted
over 5 years ago
by
sangeethashekar
3
Comments
11.1 Temporary Tables versus Table Variables In order to determine if table variables or temporary tables is the best fit for your application, let us first examine some characteristics of table variables and temporary tables: 1. Table variables...
SQL Programmability & API Development Team Blog
10.0 Plan Cache Flush
Posted
over 5 years ago
by
sangeethashekar
1
Comments
In SQL Server 2005, certain database maintenance operations or certain dbcc commands such as “dbcc freeproccache” or “dbcc freesystemcache” will clear the plan cache for the instance of SQL Server. Clearing the plan cache causes a recompilation of all...
SQL Programmability & API Development Team Blog
9.0 Memory Pressure Limits
Posted
over 5 years ago
by
sangeethashekar
1
Comments
The procedure cache responds to memory pressure like all other cache stores built using the common caching framework. The eviction of cache entries under memory pressure is based on the cost of the entry (plan). When memory pressure conditions are reached...
SQL Programmability & API Development Team Blog
8.0 Factors that Affect Batch Cache-ability
Posted
over 5 years ago
by
sangeethashekar
1
Comments
During batch compilation we make a determination regarding the cache-ability of the batch. Each statement in the batch is evaluated either as not-cacheable, cacheable, cache even though zero cost, set cost on re-use or not-cacheable due to sensitive information...
SQL Programmability & API Development Team Blog
7.0 Costing Cache Entries
Posted
over 5 years ago
by
sangeethashekar
1
Comments
A uniform costing scheme has been implemented for all cache stores in SQL Server 2005. The cost of a query depends on 3 factors: number of disk IO requests, number of context switches during query compilation (in 4 ms quantums) and the number of memory...
SQL Programmability & API Development Team Blog
6.0 Best Programming Practices
Posted
over 5 years ago
by
sangeethashekar
6
Comments
In this section we will outline some programming practices for efficient plan cache usage: 6.1 Client Side Parameterization of Queries If your application has repeated execution of the same query with only parameter values changing from query...
SQL Programmability & API Development Team Blog
5.0 Retrieving Query Plans from Plan Cache DMV’s
Posted
over 5 years ago
by
sangeethashekar
1
Comments
The compiled plan is generated for the entire batch (batch level) while individual statements in the batch have query plans (statement level) associated with them. We demonstrated earlier how to retrieve the compiled plan, and in this section we will...
SQL Programmability & API Development Team Blog
4.0 Query Parameterization
Posted
over 5 years ago
by
sangeethashekar
1
Comments
Using parameters or parameter markers in queries increases the ability of SQL Server to reuse compiled plans. There are two places where parameterization of queries can be done: on the client side application (or mid tier) or on the server side. ...
SQL Programmability & API Development Team Blog
3.0 How Cache Lookups Work
Posted
over 5 years ago
by
sangeethashekar
1
Comments
Each cache store is implemented as a hash table. A hash value and cache key pair is used in order to check if the compiled plan is cached for a given query in the cache stores. The hash value of all cache objects is computed as (database_id * object_id...
SQL Programmability & API Development Team Blog
2.0 Sql_Handle and Plan_Handle Explained
Posted
over 5 years ago
by
sangeethashekar
1
Comments
2.1 What is a Plan_Handle Cached compiled plans are stored in the SQLCP or the OBJCP cache stores. A cached compiled plan can be retrieved from either of these cache stores using the plan_handle of the compiled plan. The plan_handle is a hash value...
SQL Programmability & API Development Team Blog
1.0 Structure of the Plan Cache and Types of Cached Objects
Posted
over 5 years ago
by
sangeethashekar
1
Comments
The plan cache is comprised of 4 separate cache stores: Object Plans (CACHESTORE_OBJCP), SQL Plans (CACHESTORE_SQLCP), Bound Trees (CACHESTORE_PHDR), and Extended Stored Procedures (CACHESTORE_XPROC). Each of these four cache stores conform to a uniform...
SQL Programmability & API Development Team Blog
Plan Cache Concepts Explained
Posted
over 5 years ago
by
sangeethashekar
2
Comments
Since the release of SQL Server 2005 there have been several questions around how plan caching has been implemented in this release and how to diagnose (and distinguish) plan cache related performance problems. In a series of blog articles we will attempt...
SQL Programmability & API Development Team Blog
Case-insensitive Search Operations
Posted
over 5 years ago
by
Peter Scharlock
1
Comments
Many applications have a functional requirement for the underlying database to have a case-sensitive sort-order, implying that all character data related operations are case-sensitive. With SQL Server, such databases are created with either the ‘binary...
Page 1 of 1 (18 items)