Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DB size become smaller 10x after rebuild
Message
From
03/05/2005 12:04:33
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
02/05/2005 13:14:54
General information
Forum:
Sybase
Category:
SQL Syntax
Miscellaneous
Thread ID:
01010209
Message ID:
01010497
Views:
16
Winan,

When the database runs, it has to add space when rows are added but is does not take space away when they are deleted. The database will attempt to reuse space that the delete left behind but it is not perfect. There is also some issues with page size if you have a lot of varchar type columns. You need to read the docs about optimizing for page size.

As far as having to rebuild all the time, I would not unless you have a hard drive space problems. It takes more resources to grow the database file when you are inserting rows then it does to reclaim space left by deleted rows.

One last thought. Was part of your size difference the transaction log? If so, you need to periodically truncate the log. Be very careful with this if your database is part of a replication system.


>Dear All,
>
>I created my DB using ASA 7, I don't understand after I rebuild the database, the size become 10x smaller ? (from +/- 22MB to 2.1MB)..why? or should I have to always rebuild it or is there another way to maintain the size? .. please advise ..
>Thanks a lot in advance
>
>Regards
>Winanjaya
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform