Subject | Re: [firebird-support] Re: TempDirectories and ALTER INDEX ACTIVE |
---|---|
Author | Alec Swan |
Post date | 2012-06-08T15:24:51Z |
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?
customers. However, it sounds like rebuilding an index cannot require more
space that the database size itself, right?
On Fri, Jun 8, 2012 at 7:22 AM, hvlad <hvlad@...> wrote:
> **
>
>
>
>
> --- In firebird-support@yahoogroups.com, Alec Swan wrote:
>
> > My main question is how can we calculate the temp sort space required
> > to ALTER INDEX ACTIVE (on all indexes serially) given the size of the
> > database? Is twice the size of the database a good upper bound?
>
> Enumerate all fields in index, calculate summa of full size of every
> field (for [var]char(N) it is N * bytes_per_char, for ex.), add extra 8
> bytes (for record number) - this is sort record size.
> Multiply it by number of records and you'll get a lower estimate of
> temp space required. Substract value of TempCacheLimit and you'll get
> estimate of disk space required.
>
> Regards,
> Vlad
>
>
>
[Non-text portions of this message have been removed]