Re: Help Deleting Records
Posted in 1996
Topics: General Discussion
In article <4p1sav$nbt@sjx-ixn4.ix.netcom.com>, bedros@ix.netcom.co says... > >I inhereted an application from an old employee here that was written >in Informix Version 1.10 under a Unix platform. I am trying to delete >records from the table. I use the DELETE FROM table WHERE dater < >"03/01/96". This seem to mark the record for deletion, but the table >size is still the same. Is there a pack command that I have to run? >If there is such a command, what is it. > >Please email me at >bedros@ix.netcom.com > >thanks, >timmo Sorry, but there is no such thing as pack. I had simular problems with very dynamic tables. You can however, let Informix free up the deleted records. It goes something like this: First you run your DELETE FROM WHERE.... Next you run ALTER TABLE tablename MODIFY fieldname format (format must differ from the original format of fieldname! like from 'small float' to 'float') Informix will recreate your table without the deleted records. The last thing you have to do is running the same query again but now with the original field format. One other way of doing it is to stream your database to tape and RECREATE your database from scratch using your tape. Don't forget to run UPDATE STATISTICS after you've done this. It makes the engine run more efficient. Cheers, Frits Schouten Senior Process Computer Engineer BHP NZ Steel Process Computer Department Private Bag 92121, Auckland NEW ZEALAND Phone: +64-9-3758111 ext:5261; Fax: +64-9-3758826. Internet: schouten.frits.jf@bhp.com.au