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 Fri, Jun 8, 2012 at 7:22 AM, hvlad <hv...@users.sourceforge.net> 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] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/