FIX: DBREINDEX on Large Tables May Cause High Number of Extent Lock Timeouts (329069)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q329069
BUG #: 362079 (SHILOH_BUGS)
SYMPTOMS
Use of DBCC DBREINDEX to rebuild all the indexes on a table may cause a large number of extent lock timeouts (perhaps as high as several hundred thousand timeouts per second) for several seconds or minutes. This may periodically repeat itself during the reindexing process.
The same problem may also occur when you use a CREATE INDEX ... WITH DROP_EXISTING statement to rebuild the clustered index for a table.
The large number of lock timeouts causes the reindex operation to take longer than it should. CPU utilization also generally increases during the time that the lock timeouts are high.
CAUSE
The algorithm that SQL Server uses to search for free space to store the new index pages might end up repeatedly trying to acquire an extent lock that is not available yet.
In this case, the extent lock that SQL Server tries to acquire is an extent that was deallocated earlier in the reindex transaction, and it is not available for use until the transaction commits.
RESOLUTIONA supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft SQL Server 2000 service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Version Size File name
------------------------------------------------------------
13-Sep-2002 2000.80.685.0 7,467,089 bytes Sqlservr.exe NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files. WORKAROUND
To work around this behavior, you can rebuild each index in a separate transaction, which substantially reduces the number of potential extents that are deallocated but remain unavailable for use. This dramatically reduces the number of timeouts and improves the time it takes to rebuild the indexes.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
This problem typically becomes worse as the table size increases and the number of nonclustered indexes on the table increases.
The number of lock timeouts is most easily monitored by using Performance Monitor. Select the SQL Server:Locks object, and then select the Lock Timeouts/sec counter for the Extent instance.
Modification Type: | Minor | Last Reviewed: | 10/11/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbQFE KB329069 |
---|
|