How to activate all indexes?
Run the following query:
SET TERM !! ;
EXECUTE BLOCK AS
DECLARE VARIABLE stmt VARCHAR(1000);
BEGIN
for select 'ALTER INDEX '||rdb$index_name ||' ACTIVE;'
from rdb$indices
where rdb$system_flag is not null and rdb$system_flag = 0
into :stmt
do EXECUTE STATEMENT :stmt;
END!!
SET TERM ; !!
If you run Firebird 1.x which doesn't have EXECUTE BLOCK, you can run the following query:
select 'ALTER INDEX '||rdb$index_name ||' ACTIVE;'
from rdb$indices
where rdb$system_flag is not null and rdb$system_flag = 0
then copy/paste the results as a new query and run them. If you want to do it from ISQL, there's detailed explanation in FAQ #1.





The Firebird FAQ