Subject | Re: [firebird-support] touching a deleted record |
---|---|
Author | Ann W. Harrison |
Post date | 2007-01-24T15:10:05Z |
Nick Upson wrote:
the record directly or in an aggregate, foreign key checking,
triggered actions that read the record, or a non-indexed search.
In some cases - superserver with deferred garbage collection -
just referencing one record that requires garbage collection
will cause the garbage collect thread to clean up all records
on the page.
Regards,
Ann
>Using the "References" privilege - which can include selecting
> When Firebird deletes a record, it doesn't remove the record from
> the database. Instead, it creates a new version of the record,
> without data, marked as deleted. When the transaction that did
> the delete commits, and all concurrent transactions exit, the next
> transaction that touches the record removes the deleted stub and
> all earlier versions of the record.
>
> which I, hopefully, understand.
>
> I don't know is what counts as 'touching' the record,
the record directly or in an aggregate, foreign key checking,
triggered actions that read the record, or a non-indexed search.
In some cases - superserver with deferred garbage collection -
just referencing one record that requires garbage collection
will cause the garbage collect thread to clean up all records
on the page.
>When you backup the database, unless you use the -g switch.
> select count(*) touches all records but if my only access into the
> table is via an index and I never sweep, when does the deleted stub
> get removed?
Regards,
Ann