Subject Mass index activation.
Author Ann W. Harrison
At 09:49 AM 12/16/2004, giovanibettiol wrote:


> Just one more question: is there a way to activate
>all the indexes in a single statement?

You should activate indexes in two steps - first those
that enforce primary key and unique constraints, then
all the rest.

update rdb$indices set rdb$index_inactive = 0
where rdb$unique_flag = 1;

commit;

update rdb$indices set rdb$index_inactive = 0
where rdb$index_inactive = 1;

commit;

Alternately, activate all the indexes that aren't foreign
key indexes, then activate the foreign key indexes.

update rdb$indices set rdb$index_inactive = 0
where rdb$foreign_key is NULL;

commit;

update rdb$indices set rdb$index_inactive = 0
where rdb$foriegn_key is not NULL;

commit;

Cheers,

Ann