May 25, 2011 at 3:14 am
Hi,
Is there any difference between reindex an index and destroy the index and then create it again?
May 25, 2011 at 4:24 am
there are is type of index adjustment rebuild and reorganize.
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
May 25, 2011 at 4:27 am
river1 (5/25/2011)
Hi,Is there any difference between reindex an index and destroy the index and then create it again?
The rebuild will do the same (destroy the index and then create it again)
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
May 25, 2011 at 4:35 am
That's what it's basically doing, but it's doing it in a single command as opposed to two. Why do you ask?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 25, 2011 at 2:44 pm
do you mean drop the index and then recreate or using create index with drop_existing?
using alter index means indexes enforcing PRIMARY KEY and UNIQUE constraints can be rebuilt without dropping and re-creating the constraints.
alter index is atomic.
alter index with the all clause would do all the indexes on a table in one command.
There are a number of differences - Best refer to BOL.
---------------------------------------------------------------------
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply