Subject Re: total records and total versions bigger than expected
Author Juan Jose Ochoa
Hi,

1. Can the rows marked as deleted make the selection of records
slower.
2. How can I know who own the transaction (or the transaction number)
that has been around for a while?
3. Can I use gfix -commit (somehow) from my pc to solve this
situation?

Thanks
Juan Jose.

--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> Juan Jose Ochoa wrote:
> >
> > Can someone tell me please why the statistics of the table say I
have
> > 8272 records when I only have 30. This morning it said that I
had
> > 80000~ when I really had about two hundred.
> >
>
> Gstat counts all records in the database, including those that are
> marked as deleted but have not yet been removed. Records that are
> marked as deleted are not actually removed until after the end of
all
> transactions that started before the delete was committed. Even
when
> that condition is meet, the record is only garbage collected when
some
> transaction tries to read it, so gstat may be counting records that
are
> awaiting garbage collection.
>
> Your stats show a transaction that's been around while more than
6500
> other transactions have come and gone.
>
> Oldest transaction 304318
> Oldest active 304319
> Oldest snapshot 301818
> Next transaction 308396
>
> As an aside, gstat also counts all index entries, including those
that
> represent records that have been deleted but not garbage
collected. As
> a result, gstat will sometimes report duplicates in unique or
primary
> key indexes - no transaction can see both entries, but the index
does
> have two entries for the same value.
>
> Regards,
>
>
> Ann