Subject | Re: [firebird-support] How recompute all indexes |
---|---|
Author | Kulheim Jaroslav |
Post date | 2005-02-03T14:23:56Z |
Hi, thanks for reply, I wrote following script on linux. (please change
IBNAME, IBUSER, IBPASSWORD)
/opt/firebird/bin/isql -i IBNAME_recompute.sql -q -page 9999 -user
IBUSER -password IBPASSWORD IBNAME.gdb
IBNAME_recompute.sql:
SET AUTODDL ON;
SHELL rm -f /tmp/IBNAME_recompute.tmp;
OUTPUT /tmp/IBNAME_recompute.tmp;
select 'alter index ' || rdb$index_name || ' inactive;' as COL1 from
rdb$indices where rdb$index_name not starting with 'RDB';
select 'alter index ' || rdb$index_name || ' active;' as COL1 from
rdb$indices where rdb$index_name not starting with 'RDB';
OUTPUT;
SHELL cat /tmp/IBNAME_recompute.tmp |grep -v "COL1" |grep -v "===="
INPUT /tmp/clanky_recompute1.tmp;
IBNAME, IBUSER, IBPASSWORD)
/opt/firebird/bin/isql -i IBNAME_recompute.sql -q -page 9999 -user
IBUSER -password IBPASSWORD IBNAME.gdb
IBNAME_recompute.sql:
SET AUTODDL ON;
SHELL rm -f /tmp/IBNAME_recompute.tmp;
OUTPUT /tmp/IBNAME_recompute.tmp;
select 'alter index ' || rdb$index_name || ' inactive;' as COL1 from
rdb$indices where rdb$index_name not starting with 'RDB';
select 'alter index ' || rdb$index_name || ' active;' as COL1 from
rdb$indices where rdb$index_name not starting with 'RDB';
OUTPUT;
SHELL cat /tmp/IBNAME_recompute.tmp |grep -v "COL1" |grep -v "===="
>/tmp/IBNAME_recompute1.tmp ;SET ECHO ON;
INPUT /tmp/clanky_recompute1.tmp;