Subject | Re: [firebird-support] Big Index using problem in FB |
---|---|
Author | Alexandre Benson Smith |
Post date | 2006-02-10T13:13:02Z |
Wei Yu wrote:
RETURNS
(
INDEXNAME VARCHAR(255) CHARACTER SET ISO8859_1
)
AS
begin
for
select
cast(rdb$Index_Name as varchar(255))
from
rdb$Indices
into
:IndexName
do begin
execute statement 'set statistics index ' || :IndexName;
IndexName = IndexName || ' statistics updated';
suspend;
end
end
^
then you do
select * from THOR_UpdateIndexStatistics;
commit;
atfer your commit, your indices statistics will be up to date.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> Hi, AlexCREATE OR ALTER PROCEDURE THOR_UpdateIndexStatistics
>
> Could you please repost the procedure code?
>
> Thanks
>
> William
>
RETURNS
(
INDEXNAME VARCHAR(255) CHARACTER SET ISO8859_1
)
AS
begin
for
select
cast(rdb$Index_Name as varchar(255))
from
rdb$Indices
into
:IndexName
do begin
execute statement 'set statistics index ' || :IndexName;
IndexName = IndexName || ' statistics updated';
suspend;
end
end
^
then you do
select * from THOR_UpdateIndexStatistics;
commit;
atfer your commit, your indices statistics will be up to date.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br