Subject | Re: [firebird-support] How can I rebuild a PK index? |
---|---|
Author | Helen Borrie |
Post date | 2005-12-18T22:27:51Z |
At 12:23 AM 19/12/2005 +1100, I wrote:
"It" being recomputing the index statistics. This *isn't* the same thing
as [re]building the index, though.
You wrote:
recomputing the index statistics, natch.
But it's not clear what you mean by "programmatically", either. Dropping
constraints or altering indexes aren't things you can do while the index is
in use...and dropping an integrity constraint requires exclusive sysdba or
owner access (a shut-down database).
./heLen
> >So my questions:I wrote:
> >
> >1) Why hasn't this index already been computed? I thought it was
> >automatic...
>It is - but it only happens a) at startup (when the first user connects toor b) when you run SET STATISTICS from isql.
>the database after all have disconnected)
"It" being recomputing the index statistics. This *isn't* the same thing
as [re]building the index, though.
You wrote:
> >2) How can I (programatically) recompute the index (without gbak)?I wrote
>You can't drop constraint indexes - you need to drop the constraint and--- to REBUILD indexes. Of course you don't drop constraints for
>then re-apply it.
recomputing the index statistics, natch.
But it's not clear what you mean by "programmatically", either. Dropping
constraints or altering indexes aren't things you can do while the index is
in use...and dropping an integrity constraint requires exclusive sysdba or
owner access (a shut-down database).
./heLen