Thread View: borland.public.interbase.opensource
2 messages
2 total messages
Started by C.H. Luke
Tue, 06 Sep 2005 02:06
IB 6020 Sweeping not preventing database growth
Author: C.H. Luke
Date: Tue, 06 Sep 2005 02:06
Date: Tue, 06 Sep 2005 02:06
30 lines
2174 bytes
2174 bytes
I write a utility in Delphi 7 that inserts a bunch of records into a temporary local IB 6020 database table. I do this repeatedly for a bunch of files that I have to upload. The type of file that has to be uploaded is not simple. A bunch of calculations have to be performed on each line, then an INSERT() can be made. For safety reasons, I always switch on forced writes and I commit every insert. Before loading the next file's worth of INSERT()'s I delete the contents of the entire temp table. Of course, this makes the database grow, a lot. I need to control this growth. It grows a little over a meg each file I load, and I have thousands of files to load, so, database growth must be controlled. I did an experiment where I a) Deleted all the previous records, b) Did a sweep using IBConsole, c) loaded the next file. Result: The database grew by about a meg, as usual. I thought a sweep was supposed to free up garbage records left over from a delete, so that new INSERT()s could use that space and *not* grow the database file any further. What am I doing wrong, and how can I control this database growth to about 5MB max? (I have Sweep interval set at the default 20,000) The reason I'm using IB for this temp table is that it provides me with all the power and flexibility of SQL, which I need. (Versus using a "dumb" text file or a TClientDataSet in memory, etc.) Thanks in advance for any help you can provide.
Re: IB 6020 Sweeping not preventing database growth
Author: Bill Todd
Date: Tue, 06 Sep 2005 02:55
Date: Tue, 06 Sep 2005 02:55
9 lines
1234 bytes
1234 bytes
Did you commit the delete transaction before you ran the sweep? Sweeping will not reduce the size of the database. It just removes row versions so the space they occupied can be reused. The database will still grow when you process the firs file but should grow less for subsequent files. -- Bill Todd (TeamB)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads