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 2005 Forums
 Transact-SQL (2005)
 alter table taking a long time

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-01-18 : 03:46:46
i have a table with over 250,000 rows.

i'm doing

ALTER TABLE dbo.images ADD
lastupdateduserid smalldatetime NULL,
lastupdated int NULL
GO

so far this is taking an hour. is this normal? anything I can do about it?

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-01-18 : 04:46:22
An hour seems excessive , considering you are not changing any indices , or no DEFAULT values are specified - which can affect performance particuarly if you have loads of page splits.
Is there anything else going on the system.
You could consider doing this in a maintanence window


Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-01-18 : 05:00:26
how in maintanence window?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-18 : 05:47:42
Are you sure you dont have an uncommited transaction in db?check using sp_who to find any blocking processes
Go to Top of Page
   

- Advertisement -