The information in this article applies to:
SUMMARYSQL Server space allocation is accelerated by an internal structure called the Global Allocation Map (GAM). The command DBCC GAMINIT can proactively populate the GAM, which in a few cases on large databases can give better allocation performance. It is generally not necessary to use this command. MORE INFORMATION
When SQL Server needs to allocate a new page, this takes place in a
sequence designed to keep similar data together. This process involves
scanning allocation pages and examining them for free space on the 255 page
allocation unit for which they control allocation. Allocation pages occur
at regular 256-page intervals throughout the database. A large database may
have so many allocation pages that scanning them for free space could take
too long. Therefore, SQL Server maintains a per-database memory-resident
structure called the Global Allocation Map (GAM), which is a bitmap
indicating which allocation pages have already been examined and found to
have no free space. By examining the GAM, SQL Server can avoid needlessly
scanning allocation pages that have no free space. The GAM is reconstructed
on-the-fly as allocation pages are examined and found to be full.
Where dbid is the dbid number of the database. If not specified, the current database is used. Usage example that populates the GAM for dbid 4:
Usage example which omits the dbid number, using the current database:
Additional query words: DBCC GAMINIT
Keywords : kbprg kbusage SSrvTran_SQL |
Last Reviewed: March 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |