RE: best way to store history file?
Posted in 1999
maybe you could try this, if you have enough disk space: (1) fragment your history table, one fragment for each month's worth of data that you want to keep in it; then, at the end of each month: (2) detach the fragment containing the oldest month into a dummy table, then drop that table; (3) execute an "ALTER FRAGMENT..." stmt to change the fragmentation expression so that the newly "freed" fragment is assigned to hold the data that is about to be moved to the history table; (4) use an "ALTER FRAGMENT...ATTACH" stmt to move the new data into the history table (this will "consume" the original table); (5) re-create the original table. If everything is set up correctly, this should be a very quick (a few minutes!!!) process. TIP: try to stay away from using a remainder fragment -- it can really mess things up when trying to do quick DETACH's / ATTACH's HTH ================================ Paul A. Mosser, Open Systems DBA Informix Certified DBSA Wells Fargo & Co. Tempe, Arizona paul.mosser@wellsfargo.com ================================ -----Original Message----- From: cklo@news.hk.super.net [mailto:cklo@news.hk.super.net] Sent: Monday, February 08, 1999 9:04 AM To: informix-list@iiug.org Subject: best way to store history file? We got a table (~60M per month) needs to go to the history table at the end of the month. What's the best way to do it? We are using normal unload and load, drop the table and create it as empty, is there a better (smarter) method? Platform: AIX 4.1.5, ODS 7.23UC4. Thanks. Chris