July 28, 2009 at 1:29 am
Hi,
i have around 500 tables in my database with size of 20 GB. Now i am planing to remove 200 tables from the database. after deleting the database still the size is showing same like previously. i came to know that if we shrink the database it will remove unwanted space.Shell we do it in Prtoduction environment during the downtime.is there any performance issue by Shrinking the DB.Please update your inputs here.
Thanks,
Thulasi.
July 28, 2009 at 1:48 am
trayalacheruvu (7/28/2009)
Hi,is there any performance issue by Shrinking the DB.Please update your inputs here.
Thanks,
Thulasi.
Yes, you'll face performance issues. This is due to the fact that shrinking causes fragmentation of indexes. You may have to reorganze or rebuild your indexes post shrink operation.
If you're certain that your database will not reach it's current size in next 3-6 months, you can do shrinking for once or else leave it to its current size as it'll be eventually filled in due course of time.
July 28, 2009 at 1:51 am
EDIT-double post due to internet issue.
July 28, 2009 at 3:38 am
hi,
Thanks for your quick update update.. Actually i am rebuilding the indexes every during the non-working hours.. ok after Shrink the Database i need to rebuild the indexes. the performance will be as usaual right?
Thanks,
thulasi
July 28, 2009 at 4:11 am
trayalacheruvu (7/28/2009)
hi,Thanks for your quick update update.. Actually i am rebuilding the indexes every during the non-working hours.. ok after Shrink the Database i need to rebuild the indexes. the performance will be as usaual right?
Thanks,
thulasi
You should not rebuild your indexes so often. this again makes your log files to grow heavily... Rebuiling indexes will, however, keep the performance right.
July 28, 2009 at 4:40 am
ok i agree rebilding the indexes will increase the log file..
Actually i want to show management after cleaning up the database this size got reduced from Ex: 200 GB to 150 GB..means which will suggestible one ?
Thanks,
Thulasi.
July 28, 2009 at 7:45 am
trayalacheruvu (7/28/2009)
Actually i want to show management after cleaning up the database this size got reduced from Ex: 200 GB to 150 GB.
If you are sure the db will not grow upto 200GB again in the near future, you can go ahead with shrinking the database and rebuilding indexes.
July 28, 2009 at 8:35 am
Why do you want to shrink? Databases tend to grow as more data gets put in them. It's in their nature.
Shrinking causes massive fragmentation and will just result in the data file growing again next time data gets added. When that happens, the entire system will slow down as the file is expanded. Also repeated shrinks and grows will cause fragmentation at the file-system level, which is hard to fix.
See - http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 2, 2009 at 5:43 am
will it be any performance issue if i shrink log file?
August 2, 2009 at 1:15 pm
If it has to grow again, yes.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 2, 2009 at 4:05 pm
trayalacheruvu (7/28/2009)
Hi,i have around 500 tables in my database with size of 20 GB. Now i am planing to remove 200 tables from the database. after deleting the database still the size is showing same like previously. i came to know that if we shrink the database it will remove unwanted space.Shell we do it in Prtoduction environment during the downtime.is there any performance issue by Shrinking the DB.Please update your inputs here.
Thanks,
Thulasi.
You say the original database size was 20 GB. What was the "used" size after deleting the 200 tables?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply