Subject Re: [IBO] Re: Database file size increases heavily
Author Arno Garrels
Marco,


> compoent, or you are using <default> value in IB_Transaction property?

I'm a lazy guy so I used default transactions.
Nevertheless I gave a transaction placed on the datamodule a try as well,
but...

> Well, don't to "second try".

I agree, it was just another helpless attempt.

> Never used .EmptyTable, I should check the source to know what it
> does. In any case, I would have choose from this two possibilities:
> a) use a TIB_DSQL with a "delete from mymastertable".

procedure TIBOBaseTable.EmptyTable;
begin
BeginBusy( false );
try
if Active then
CheckBrowseMode;
with InternalDataset do
if CheckConnection( true ) then
ExecuteImmediate( 'DELETE FROM ' + TableName, nil );
if Active then
begin
InternalRefresh;
First;
end;
finally
EndBusy;
end;
end;


> b) create a stored procedure in the server that deletes the tables

You are right, generally I should move plenty of db-work into stored
procedures, but that's another task may be I'll care about next year.

> I think that the right sequence is Commit and then close,

I was not sure, so I tried the other way around as well but..


> > Mastertbl.First;
>
> The above line starts a transaction!

Didn't know that.
Even if InTransaction is already true?

> I assume you can't do this loop inside of
> a Stored Procedure because you need Zip_Encrypt(), right?

Yes, and it is not the only reason.

> In the meanwhile, is some other client starting another "1 minute
> loop" against the same tables?

No, the tables we are talking about are accessed by my server-service-app.
quasi exclusively, my GUI clients have access to other tables.

> Mmmm... is it just only client application doing this? What tables are
> other client affecting? Reading/writing? Or your is a single user
> situation? And what's the 1 minute cycle?

It's a client/server app. for distributing files per FTP/SMTP automatically.
That 1 minute loop is the poll cycle of its job scheduler.

Now I'm thinking about using kbMemtable for that task that blows up the
database so quickly.

Thanks again

Arno Garrels