Subject | Index problem |
---|---|
Author | guido.klapperich@t-online.de |
Post date | 2001-08-09T14:01:50Z |
I have an performance problem, when I deactivate and activate my
indices.
I have a empty DB and I insert several thousands of datasets. Now I open
a query and it takes 0,1362 sec. Now I deactivate all my indices with
the following SP
CREATE PROCEDURE P_DEACTIVATE_INDICES
AS
begin
update RDB$INDICES set RDB$INDEX_INACTIVE=1 where RDB$INDEX_NAME
starting with 'I_';
end
All my indices begin with the suffix 'I_'
Then I acivate all my indices with the following SP
CREATE PROCEDURE P_ACTIVATE_INDICES
AS
begin
update RDB$INDICES set RDB$INDEX_INACTIVE=0 where RDB$INDEX_NAME
starting with 'I_';
end
Now I open the query again and it takes nearly 4 sec.
Have anybody a idea, what the reason is for this behaviour ?
Guido
indices.
I have a empty DB and I insert several thousands of datasets. Now I open
a query and it takes 0,1362 sec. Now I deactivate all my indices with
the following SP
CREATE PROCEDURE P_DEACTIVATE_INDICES
AS
begin
update RDB$INDICES set RDB$INDEX_INACTIVE=1 where RDB$INDEX_NAME
starting with 'I_';
end
All my indices begin with the suffix 'I_'
Then I acivate all my indices with the following SP
CREATE PROCEDURE P_ACTIVATE_INDICES
AS
begin
update RDB$INDICES set RDB$INDEX_INACTIVE=0 where RDB$INDEX_NAME
starting with 'I_';
end
Now I open the query again and it takes nearly 4 sec.
Have anybody a idea, what the reason is for this behaviour ?
Guido