Subject Re: [firebird-support] Create index while database is in use?
Author Dmitry Kuzmenko
Hello, Raith,Daniel!

Saturday, March 2, 2013, 1:39:35 AM, you wrote:

RD> Is it safe?

RD> I want to create an index on a table but the database (fb1.5) has
RD> ~20 active users. Database usage is mostly reads, especially the table I want to
RD> index.

RD> I just don't want to take a chance creating an index with active
RD> connections could corrupt the database.

With FB 1.5 - yes, if table is being modified when you create
index on it, you may get an index that will have less keys
than values (or versions) in the table.
So, in terms of integrity index will not cover all records,
and can be considered as "corrupted", because search of an index
may not include some records. But, you will not get
DB corrupted in terms of "corrupted DB". I mean, there will no be
broken structures or data in DB, that can give errors like
"consistency check".

Firebird 2.5 have protection for that, i.e. table modifying will be
locked for the time of index creation (if I remember correctly what is
locked - index creation or table data modification).

--
Dmitry Kuzmenko, www.ib-aid.com