Subject | Re: Stored Procedures, Isolation Levels, a nd Transactions |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-04-21T17:14:35Z |
--- In firebird-support@yahoogroups.com, "Epstein, Ed" <eepstein@c...>
wrote:
only. For delete - all. Secondly, metadata changes (incliding indices
deactivation/activation) should be made in single-user access only.
System index can be deactivated by updating it's column
rdb$index_inactive to 1 in rdb$indices table and commit. Activated -
by updating it back to 0 and commit. Note while system index is
inactive at least constraint which is based on it can be violated.
Perhaps more unpleasant things, don't know. One-time index rebuilding
will consume MUCH less time than multiple rebuilding during mass
update of indexed column and collection of garbage in the index after it.
Best regards,
Alexander
wrote:
> The points about the indexes are very interesting. I have about 7indexes
> on the table. I limited the indexes to columns i really needed them on.for the
> None of the indices are unique though. I have a single constraint
> table that does not involve the column being updated. How do I go aboutabout
> deactivating an index before running the SP. After that how do I go
> activating again afterwards. My big question of course, is that when Irebuild the
> activate after a couple million updates how long will it take to
> index and how will that affect select statements being run on it?Firtsly, AFAIU for update important are indices on updated columns
only. For delete - all. Secondly, metadata changes (incliding indices
deactivation/activation) should be made in single-user access only.
System index can be deactivated by updating it's column
rdb$index_inactive to 1 in rdb$indices table and commit. Activated -
by updating it back to 0 and commit. Note while system index is
inactive at least constraint which is based on it can be violated.
Perhaps more unpleasant things, don't know. One-time index rebuilding
will consume MUCH less time than multiple rebuilding during mass
update of indexed column and collection of garbage in the index after it.
Best regards,
Alexander