Subject | RE: [firebird-support] Update RDB$INDICES |
---|---|
Author | Thomas Steinmaurer |
Post date | 2004-10-14T06:21:46Z |
David,
First of all, updating the system tables directly when there is
an equivalent DDL statement, is a bad thing.
And second, you've to activate the indices in the right order.
For instance, you've to activate an index of a primary key
constraint before activating an index used in a foreign key
which refers to that primary key.
which queries to rdb$indices table to generate a DDL
script including the ALTER INDEX ... statement.
Rearrange these statements manually and execute that
script against your database.
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com
> I'm using FB1.5 for Linux.Theoretically yes, but practically no. ;-)
>
> Is is possible (or desirable) to perform:
>
> 'UPDATE RDB$INDICES SET RDB$INDEX_INACTIVE = 0'
First of all, updating the system tables directly when there is
an equivalent DDL statement, is a bad thing.
And second, you've to activate the indices in the right order.
For instance, you've to activate an index of a primary key
constraint before activating an index used in a foreign key
which refers to that primary key.
> to activate all of the indexes that were set to inactive afterWhat I would do is, create a selectable stored procedure
> performing a "gbak -r -i" for a problemed database? Will FB
> automatically rebuild these indexes internally if I perform this update?
>
> Or should I skip using an update statement, and use the proper 'ALTER
> INDEX index_name ACTIVE;' statement?
which queries to rdb$indices table to generate a DDL
script including the ALTER INDEX ... statement.
Rearrange these statements manually and execute that
script against your database.
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database and MS SQL Server
Upscene Productions
http://www.upscene.com