Subject | Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE |
---|---|
Author | Mark Rotteveel |
Post date | 2012-06-10T10:09:52Z |
On 8-6-2012 18:07, Ann Harrison wrote:
sort? I would think that for an index rebuild this would be sufficient:
* deactivate index
* clear index
* for each record (sequential read of all pages?)
* insert column value into index
* activate index
These steps would not require any additional temporary space.
--
Mark Rotteveel
> On Fri, Jun 8, 2012 at 11:24 AM, Alec Swan <alecswan@...> wrote:Question out of curiosity: why does an index rebuild actually require a
>
>> Thanks Vlad, but this is too complicated to give as a guidance to our
>> customers. However, it sounds like rebuilding an index cannot require more
>> space that the database size itself, right?
>
>
> On a bad day, yes it could. To have a day that bad, you'd have to have
> keys that are most of the size of the record, with columns that are often
> null, zero, or contain values much smaller than the declared size of the
> column. There may be a situation during the merge phase of the sort when
> there's more than one copy of each record.
sort? I would think that for an index rebuild this would be sufficient:
* deactivate index
* clear index
* for each record (sequential read of all pages?)
* insert column value into index
* activate index
These steps would not require any additional temporary space.
--
Mark Rotteveel