Subject Re: [firebird-support] rebuild primary key index?
Author Ann W. Harrison
gabrielsenkim wrote:
>
> 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.

Primary keys are written in ascending order.

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