Subject | RE: [firebird-support] Rebuilding primary key index? |
---|---|
Author | Leyne, Sean |
Post date | 2010-11-09T18:07:14Z |
Kjell,
Unlike user indexes, primary key indexes have a fixed selectivity which means that they never become "unbalanced" -- so they never need to be re-indexed.
Sean
> Apparently it's not possible to deactivate a primary key index. SeemsWhy do you need to rebuild it?
> reasonable. So, how do I rebuild it?
Unlike user indexes, primary key indexes have a fixed selectivity which means that they never become "unbalanced" -- so they never need to be re-indexed.
> Would require I make sure no dups are entered while the PK constraint is notYou should be able to test for uniqueness using a simple SQL statement, without have to use constraints.
> present. I guess I could add a unique constraint first, then drop the pk, then
> add the pk and finally drop the unique constraint. But seems like I would be
> building essentially the same index twice, while once should suffice.
Sean