Subject | Re: SET STATISTICS |
---|---|
Author | David Savill |
Post date | 2007-01-31T06:46:36Z |
I read somewhere that doing a backup and then a restore rebuilt the indexes - is this
correct?
Thanks,
David.
correct?
Thanks,
David.
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith <iblist@...> wrote:
>
> Vlad Orlovsky wrote:
> > Hi All,
> >
> > I would like to schedule a job that would rebuild all the indexes in the DB.
> >
> > Do I need to SET STATISTICS... after
> >
> > DROP INDEX...
> > CREATE INDEX...
> >
> > or is SET STATISTICS by itself sufficient?
> >
> > Thanks in advance,
> > Vlad
> >
>
> Set statistics will recompute the index selectivity.
>
> Alter index INDEX_NAME INACTIVE;
> Alter index INDEX_NAME ACTIVE;
>
> Will rebuild the index.
>
> Note that you cannot make an index created by a constraint (PK, FK,
> Unique) inactive.
>
> see you !
>
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>