Subject Re: Problems with gbak
Author Aage Johansen
Henner Kollmann wrote:
> Found another solution: If i use gbak -GARBAGE_COLLECT everything works,
> i can backup the database.
> OK, some words of the data history:
> 1. Inserts 2.500.000 records into the table
> 2. Delete this 2.500.000 records
> 3. Insert 4.500.000 record again
> After this i want to backup and restore the database to make a garbage
> collection. So the using gbak -g is ok in this case.
> But why do the engine hang while making an garbage collection in the
> database?
> Any idea?


I'd guess that it does not really hang, it is just very busy doing the
garbage collection (GC). GC on 2.500.000 may take some time, and if there
are indexes it will be even slower.
Drop (or set inactive) indexes before doing the delete. You can GC by
doing a "select count(*) from XXX", optionally with a "where" covering just
the records that were deleted.


Regards,
Aage J.