June 5, 2007 at 2:46 pm
We have this statement:
ALTER TABLE TD_WR ADD tf_FromWeb BIT NOT NULL DEFAULT(0);
running against a table with over 500,000 rows. My supervisor asked me to take a look at it to make it faster because it's taking a minute and a half. I politely explained that it's a one time thing, blah blah blah,
Anyway, looking around it appears to me that there really isn't anything I can do because it has to go through each row and set the new field to zero. Am I correct or is there a faster way to do this?
Thank you!
em
June 6, 2007 at 10:01 am
in general I'd agree with you - from what basis does your "supervisor" make the conclusion the performance isn't fast enough?
I'd suggest that to find a way to optimise this more would take longer than 1.5 mins therefore this is the quickest.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
July 5, 2007 at 1:47 pm
Nice one Colin 🙂
Make your supervisor invests in faster servers and a better storage subsystem, that would help too 🙂
July 9, 2007 at 7:41 am
I highly recommend an upgrade to the supervisor!
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
July 9, 2007 at 7:42 am
. . . correction - OF the supervisor! LOL
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
July 9, 2007 at 3:56 pm
or:
exec sp_update_resume
followed by
exec sp_distribute_resume
* Noel
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply