Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need BOL clarification about indexes

Status
Not open for further replies.

pandatime

Programmer
Jan 29, 2010
92
0
0
AU
Hi,

The following explanations in quotes below are from microsoft.com. My question is, when it says:

"When a new index structure is created, disk space for both the old (source) and new (target) structures is required in their appropriate files and filegroups. The old structure is not deallocated until the index creation transaction commits.

So, when they say "old (source)" what are they talking about in the case where the index doesn't even exist yet???

(This sentence would make more sense if they are talking about an online rebuild operation)

So, are they talking about "temporary structures" created in the TEMPDB during the index creation? As in:

All other index DDL operations require additional temporary disk space to use during the operation, and permanent disk space to store the new index structure or structures.

Is that what they mean by "old (source)"? It's kind of confusing!

Thanks

Full article:
Index Operations That Require Additional Disk Space
--------------------------------------------------------------------------------

All other index DDL operations require additional temporary disk space to use during the operation, and permanent disk space to store the new index structure or structures. For more information about index structures, see Tables and Index Data Structures Architecture.

When a new index structure is created, disk space for both the old (source) and new (target) structures is required in their appropriate files and filegroups. The old structure is not deallocated until the index creation transaction commits.

The following index DDL operations create new index structures and require additional disk space:

•CREATE INDEX
•CREATE INDEX WITH DROP_EXISTING
•ALTER INDEX REBUILD
•ALTER TABLE ADD CONSTRAINT (PRIMARY KEY or UNIQUE)
•ALTER TABLE DROP CONSTRAINT (PRIMARY KEY or UNIQUE) when the constraint is based on a clustered index
•DROP INDEX MOVE TO (Applies only to clustered indexes.)
 
I believe that they are talking about when you use the DROP_EXISTING flag.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top