Subject Re: [firebird-support] Re: Very long transaction start after deleting a big number of records.
Author Ann Harrison

On Jul 29, 2014, at 12:26 AM, "brucedickinson@... [firebird-support]" <firebird-support@yahoogroups.com> wrote:

I haven't thought about scanning all the rows with SELECT after DELETE but it might be something. Perhaps FB 3.0 will help us with this. 

Doing the select in the same transaction as the delete won't help.  The delete has created a bunch of deleted stub records, leaving in place the last real version of the record and any back versions that other transactions require.  All that stays in place for the duration of your transaction, just in case the transaction actually fails.  Once the transaction that did the delete  and all its contemporaries have ended, the stubs and old record versions are ready to be removed, but not before then.

V3 probably won't change that significantly, but it may allow you to switch from Classic to a single multi-threaded server and use a garbage collect thread rather than cooperative garbage collection. 

Good luck,

Ann