Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Speeding up process of adding a column to table

Author  Topic 

magictech
Starting Member

44 Posts

Posted - 2004-09-22 : 00:45:06
I have a table that has about 80 columns and 13.5 million records. The process of adding a new column to this table takes too long. Is there a way in SQL server to speed up the process of adding columns to a large table? Any information would be greatly appreciated.

Thanks in advance

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-22 : 01:59:31
nope, you can instead of adding a column,
create a new table and use dts to transfer the data if you think adding the column is too long for you.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-09-22 : 03:58:22
By using ALTER TABLE ADD <columndef> the operation is fast.
the catch is that the column is added to the end of the table, which doesn't matter really.
( in EM it is also faster to add a column to the end, it uses "ALTER TABLE" then ).

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-09-22 : 13:09:37
.. provided that the column allows NULLs (might be an issue if it has a CONSTRAINT, but I think not)

Kristen
Go to Top of Page
   

- Advertisement -