Subject | Re: [firebird-support] Large DB after batch import: index rebuild/set stats, backup/restore? |
---|---|
Author | Kjell Rilbe |
Post date | 2010-11-10T08:40:02Z |
Thomas Steinmaurer skriver:
maybe at the FAQ site.
Regards,
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> @Kjell: For recalculating the index statistics, add the following SP toThanks! I think I saw an execute block that does something similar,
> your database.
>
> SET TERM ^^ ;
> CREATE PROCEDURE S_RECALCINDEXSTATS returns (
> INDEX_NAME VarChar(31),
> STATUS VarChar(31))
> AS
> begin
> for select rdb$index_name from rdb$indices into :index_name do
> begin
> execute statement 'set statistics index ' || index_name || ';';
> status = 'Recalculated!';
> suspend;
> when any do
> begin
> status = 'Failed!';
> suspend;
> end
> end
> end ^^
> SET TERM ; ^^
>
> To be executed with:
>
> select * from s_recalcindexstats
maybe at the FAQ site.
Regards,
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64