Subject Re: [firebird-support] Re: Truncate table
Author Alexey Kovyazin
23.08.2011 15:39, Markus Ostenried:
>
> On Tue, Aug 23, 2011 at 13:33, ck1625 <ch.kaufmann@...
> <mailto:ch.kaufmann%40splash-software.ch>> wrote:
> > My problem is still there. It's only with FB 2.5; with FB 1.5 it is
> not that slow.
> >
> > I thought, the solution is this:
> > DELETE FROM <table>
> > SELECT * FROM <table>
> >
> > But it looks like it doesn't work. It is still "random" when time is
> lost to do the cleanup work.
>
> Have you tried "SELECT Count(*) FROM <table>" ?
> This should trigger garbage collection.
>
That's not 100% true.
SELECT count(*) will trigger garbage collection only if garbage
collection condition is fulfilled.
If there snapshot transaction was started (and running) before
transaction where you delete records, not garbage will be gathered.

Regards,
Alexey Kovyazin


[Non-text portions of this message have been removed]