Re: Reducing size of .dat and .idx in SE5.02
Posted in 1996
Interesting question. I don't think there is a way of ensuring that the Tabid remains unchanged -- in fact, I'm almost certain that's the case. What I don't know is what happens to a file created with the IN clause. There are different ways of looking at what should happen (it could decide to keep the IN file name after rebuilding using a temporary name, or it could decide to create the new table in the default directory with the default name). You'll have to experiment to find out which behaviour is used. I suspect the latter, though the former would clearly be desirable for your application. It is semi-safe to update SysTables and alter the table path, but you'd have to ensure that no-one is using the database at the time. It is not supported, however. (It is semi-safe rather than safe precisely because it is not supported.) Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> >From: spitz@GANS2X.ana.med.uni-muenchen.de (Richard Spitz) >Date: 5 Mar 1996 08:21:08 GMT >X-Informix-List-Id: <news.21754> > >Jonathan Leffler (johnl@informix.com) wrote: >: When you do either an ALTER TABLE or an ALTER INDEX which is not a no-op, >: then the table is rebuilt in a new file, and it is assigned a new Tabid in >: SysTables. ^^^^^^^^^^^^^^^^^^^^^^^^^^ > >Is there a way to make sure that the rebuilt table has the same tabid _AND_ >(even more important) filename as the original table? > >We need that because we have a database which is used by C-ISAM and SE >concurrently. The table filenames are hardcoded into the C-ISAM app, >so the rebuild of the table must not change that. > >Is it safe to rename the new file back to its old name and change >systables accordingly? I'm rather hesitant to fiddle with tablenames.