Alter table command vs table copy/rename

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

Does anyone know what the pros and cons are of doing an alter table
statement rather than copy/rename table method to make table changes? For
years now, we have a product where the way they make schema changes is by
copying the table, rebuilding a table with the change like adding a new
column, bring the data back in, and then renaming the table back to the
original name. They were told that altering the table causes a roll through
all of the rows in a table once for each new column being added to the table
and that this is extremely slow. It seems that it's better to do an alter
table statement rather than the copy/rename method.

Thanks,
Dee
.



Relevant Pages

  • RE: Alter table command vs table copy/rename
    ... Generic pros and cons can go only so far with respect to this question. ... the 'copy/rename' method does have an advantage of compacting/defraging ... Does anyone know what the pros and cons are of doing an alter table ...
    (microsoft.public.sqlserver.programming)
  • Re: Alter table command vs table copy/rename
    ... some debate over here regarding alter table vs. copy/rename. ... and that this is extremely slow. ... table statement rather than the copy/rename method. ...
    (microsoft.public.sqlserver.programming)
  • Re: [OT] Heres The Kind Of Experts Who Moderate Wikipedia
    ... Than it's the written by the Hand of God! ... I don't have the power to alter the wikipedia record. ... Pros aren't beginners in their field ...
    (comp.sys.mac.advocacy)
  • Re: Users table design
    ... >The pros that were presented: ... ALTER TABLE Users ... >rows and anther could have 20. ... (Remove _NO_ and _SPAM_ to get my e-mail address) ...
    (microsoft.public.sqlserver.server)