Subject | Re: [firebird-support] endless sweep |
---|---|
Author | Ferda Brabenec |
Post date | 2005-03-10T20:16:29Z |
Ann W. Harrison wrote:
What can be done about low-selective FK indices in this matter?
Regards, Ferda
>>Ferda Brabenec wrote:Ann and Alex, thank you for your replies.
>>
>>
>>>thanks for the info. The sweep finished after 5 days.
>>>I am a bit puzzled by the fact, that indices play such a big role in sweep
>>>process. Is it because they contain references to already deleted records?
>>>
>
> Alexandre Benson Smith wrote:
>
>>I don't remember the real reason why sweep take a long time to run if
>>you have a lot of duplicates, I think because the entire duplicate chain
>>should be reached to look for the records on the data page, I am sure
>>someone will jump in and explain the real reason with acuracy.
>>
>
>
> Here's the quick version. The index contains information for all
> records in the table, including records that have been deleted and not
> garbage collected. Records are normally stored from the front of the
> table to the back, and garbage collected in the same order (FIFO). A
> new duplicate index value is stored at the beginning of the list of
> duplicates (LIFO). When the sweep finds a record to delete, it must
> also find the corresponding index entry. It takes The first record it
> sees is almost certainly going to be the last one in the chain of
> duplicates, so it has to look at each one of the n-thousand duplicates.
> In a bad case, you empty the cache
>
> Regards,
>
> Ann
What can be done about low-selective FK indices in this matter?
Regards, Ferda