Re: Optimizing dbspace
Posted in 2000
Topics: Storage & Space Management, Migration, Import/Export & Data Conversion
Simply deleting the old data, row-by-row, will not necessarily allow you to re-use that space due to row-size requirements. If your goal is to completely delete the data from the table, your best bet is to drop the table and re-create it. If you want to keep some of the data, delete what you don't want, unload the data you want to disk, drop the table, recreate it, and reload the data from the file you created on disk. -FPL >>> Elena Korol <ekorol@styleclick.com> 08/11/00 10:47AM >>> Hello, I have a quite large table that acquires about 3 million rows a month. Every two weeks we purge the data by unloading it to a backup and deleting the "old" information. We do run 'update statistics' every time when deletes are performed. But it looks like it does not optimize the dbspace and I keep adding new chunks. What will be the best way do deal with this situation? Sincerely, Elena.
Frank Louvado wrote in message <8o6a1j$38d$1@news.xmission.com>... *SNIP* > If you want to keep some of the data, delete what you don't want, unload >the data you want to disk, drop the table, recreate it, and reload the data from >the file you created on disk. > >-FPL Hey Frank, I know you just missed it probably because you stayed up late last night...... If you unload to disk the data you want to keep; then drop the table; then recreate the table; then reload the data from the file you created on disk; there is no reason to delete what you don't want if you are going to drop the table. Or did I miss something? Oh. Make sure you recreate any indexes AFTER the reload is complete. David Weis, just an Informix DBA