SQL Server Architecture

Parallel Operations Creating Indexes

The query plans built for the creation of indexes allow parallel, multi-threaded index create operations on computers with multiple microprocessors.

Microsoft® SQL Server™ 2000 uses the same algorithms to determine the degree of parallelism (the total number of separate threads to run) for create index operations as it does for other Transact-SQL statements. The only difference is that the CREATE INDEX, CREATE TABLE, or ALTER TABLE statements that create indexes do not support the MAXDOP query hint. The maximum degree of parallelism for an index creation is subject to the max degree of parallelism server configuration option, but you cannot set a different MAXDOP value for individual index creation operations.

When SQL Server 2000 builds a create index query plan, the number of parallel operations is set to the lowest value of:

For example, on a computer with eight CPUs, but where max degree of parallelism is set to 6, no more than six parallel threads are generated for an index creation. If five of the CPUs in the computer exceed the threshold of SQL Server work when an index creation execution plan is built, the execution plan specifies only three parallel threads.

The main phases of parallel index creation include:

Individual CREATE TABLE or ALTER TABLE statements can have multiple constraints that require the creation of an index. These multiple index creation operations are performed in series, although each individual index creation operation may be a parallel operation on a computer with multiple CPUs.

See Also

tempdb and Index Creation