Subject | Re: [firebird-support] rebuild primary key index? |
---|---|
Author | Ann W. Harrison |
Post date | 2009-03-24T14:56:52Z |
gabrielsenkim wrote:
For most indexes, it makes sense to reset the selectivity after
loading records because Firebird doesn't maintain selectivity
dynamically. For unique indexes and the indexes created to
support unique and primary key constraints, the selectivity is
known in advance, so you don't need to reset it.
Good luck,
Ann
>Primary keys are written in ascending order.
> I'm using the 'Select first 30 ..... ORDER BY record_id DESC' type
> of queries. when creating primary key indexes are they created as
> asc or desc by default? if they are created as asc it might be part
> of the problem.
For most indexes, it makes sense to reset the selectivity after
loading records because Firebird doesn't maintain selectivity
dynamically. For unique indexes and the indexes created to
support unique and primary key constraints, the selectivity is
known in advance, so you don't need to reset it.
Good luck,
Ann