Subject | Re: [firebird-support] Re: Updating index statistics |
---|---|
Author | Hans |
Post date | 2007-01-04T03:23:12Z |
I think to be safe, for FB2, a longer variable is required
DECLARE VARIABLE INDEXNAME CHAR(93);
DECLARE VARIABLE INDEXNAME CHAR(93);
> Hello Group,...
>
> FYI, here is the procedure:
>
> ---
> CREATE OR ALTER PROCEDURE SETALLSTATISTICS
> AS
> DECLARE VARIABLE INDEXNAME CHAR(31);
> DECLARE VARIABLE STMT VARCHAR(300);
> BEGIN
> FOR
> SELECT RDB$INDEX_NAME
> FROM RDB$INDICES
> INTO :INDEXNAME
> DO
> BEGIN
> STMT = 'SET STATISTICS INDEX ' || INDEXNAME;
> EXECUTE STATEMENT STMT;
> END
> END
> ^
> ---
> Adam