Select the product you need help with
FIX: When you run a query that uses the NOLOCK table hint in SQL Server 2005 or in SQL Server 2008 to retrieve BLOB data, the query runs very slowlyArticle ID: 961049 - View products that this article applies to. Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. On This PageSYMPTOMSYou have a query that uses the NOLOCK table hint in Microsoft SQL Server 2005 or in Microsoft SQL Server 2008. The query reads binary large object (BLOB) data of one of the following data types from a large table:
Note To display the disk activities, run the query by using the SET STATISTICS IO ON clause. CAUSEWhen the query that uses the NOLOCK table hint reads BLOB data, SQL Server verifies that each BLOB page is allocated by examining the corresponding index allocation map (IAM). The IAM is a linked list of allocation pages. Each IAM page can hold approximately 4 GB of data (8 KB page size * 8 pages * 64,000 extents). If the object is large, the verification operation can lead to excessive logical reads. For example, you have a large object mapped to a file group. The total size of files in the file group is 700 GB. In this situation, the IAM for this object can contain up to 175 pages. If you now run a query on this object by using the NOLOCK table hint, and the query accesses 10,000 BLOB pages, the number of logical reads that are related to IAM pages will be 175 * 10,000 = 1,750,000 in the worst case. If SQL Server finds the corresponding IAM page by traversing half of the linked list, the average number of logical reads that are related to IAM pages will be approximately 1,750,000 / 2 = 875,000. This is too high an overhead to incur for a query to access 10,000 BLOB pages. RESOLUTIONCumulative update information for SQL Server 2005The fix for this issue was first released in Cumulative Update 3 for SQL Server 2005 Service Pack 3. For more information about how to obtain this cumulative update package for SQL Server 2005, click the following article number to view the article in the Microsoft Knowledge Base:967909 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/967909/
)
Cumulative update package 3 for SQL Server 2005 Service Pack 3960598
(http://support.microsoft.com/kb/960598/
)
The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was releasedCumulative update information for SQL Server 2008The fix for this issue was first released in Cumulative Update 5 for SQL Server 2008. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:969531 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/969531/
)
Cumulative update package 5 for SQL Server 2008956909
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was releasedSTATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. MORE INFORMATIONThe fix for this problem uses the IAM cache to quickly determine whether a BLOB page is actually allocated. For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base: 967909 For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/967909/LN/
)
Cumulative update package 3 for SQL Server 2005 Service Pack 3969531
(http://support.microsoft.com/kb/969531/LN/
)
Cumulative update package 5 for SQL Server 2008REFERENCES
For more information about the list of builds that are available after SQL Server 2005 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
960598
For more information about the list of builds that are available after SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/960598/
)
The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was released
956909
For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/956909/
)
The SQL Server 2008 builds that were released after SQL Server 2008 was released
935897
For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/935897/
)
An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
822499 For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/822499/
)
New naming schema for Microsoft SQL Server software update packages
824684
(http://support.microsoft.com/kb/824684/LN/
)
Description of the standard terminology that is used to describe Microsoft software updatesPropertiesArticle ID: 961049 - Last Review: May 18, 2009 - Revision: 3.0 APPLIES TO
|


Back to the top








