Subject Re: [firebird-support] Question about ALTER INDEX
Author Martijn Tonies
Hello Christian,

> I have some questions about indexes in FB 1.5.2:
>
> - How can I check with an SQL statement if an index is active or inactive?

Check the flag in RDB$INDICES.

> - If I call ALTER INDEX name ACTIVE, will the index be rebuilt in any
> case or only if it was inactive before?

Always. This is a neat trick to re-calculate, for example, primary key
constraint indices, which cannot be de-activated.

> - Is there a way to have a filtered index? This means only records that
> meet a certain condition will be in the index?

No, although Firebird 2 does support expression indices, I don't
think a WHERE is supported. You could give it a try and report
back to us :-)

> - Is there a way to "freeze" the index ? I mean that the index with a
> current state is available for select statements, but new inserts are
> done without altering the index.

No.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com