Subject Re: [firebird-support] Performance when deleting a lot of records, again
Author Ann W. Harrison
Christian Kaufmann wrote:
>

> So I think the correct process is:
>
> - deactivate indexes
> - run task to rebuild tables
> - backup database to perform a sweep
> - activate indexes again
>
> Did I miss something? And is there a way to perform a sweep from a
> Delphi application?
>

deactivate indexes
rebuild tables
commit
select count (*) from tables
commit
activate indexes

You're not actually causing a sweep with the backup, just a garbage
collect pass. Any non-indexed access to the tables has the same effect.

Regards


Ann