Re: Alter table command vs table copy/rename
- From: "Aaron Bertrand [SQL Server MVP]" <ten.xoc@xxxxxxxxxxxxxx>
- Date: Wed, 17 Jun 2009 10:44:30 -0400
Yes, sp_rename is also used. I guess the problem that some people had is
altering a table that is quite large in terms of the number of rows in the
table is quite slow.
But isn't copying all of the data over to another table also slow? And then
rebuilding indexes and adding constraints? You'd think you might be saving
time because you could build the second table while people are still
accessing the first, but unless the data doesn't need to be consistent,
you'd still need a way to lock people out of making changes to the source
table until you could run the rename (personally I use ALTER SCHEMA
TRANSFER).
A
.
- Follow-Ups:
- Re: Alter table command vs table copy/rename
- From: bpdee
- Re: Alter table command vs table copy/rename
- References:
- Alter table command vs table copy/rename
- From: bpdee
- Re: Alter table command vs table copy/rename
- From: Uri Dimant
- Re: Alter table command vs table copy/rename
- From: bpdee
- Alter table command vs table copy/rename
- Prev by Date: Re: Alter table command vs table copy/rename
- Next by Date: Re: reporting services textbox calculation problem
- Previous by thread: Re: Alter table command vs table copy/rename
- Next by thread: Re: Alter table command vs table copy/rename
- Index(es):
Relevant Pages
|