121032Re: [firebird-support] Why the difference?
- Mar 1, 2013On Fri, 1 Mar 2013 08:32:09 -0400, W O <sistemas2000profesional@...>
> But the strange thing is that PER_IDENTI is the Primary Key and ORDER BYAs Firebird is retrieving all rows anyway, there is - AFAIK - no benefit
> seems not use it.
to use the primary key index for the ORDER BY. Unlike some other databases,
Firebird does not have clustered indexes so rows are not stored in their
(primary key) index order, and retrieving rows in index order is probably a
lot more inefficient then loading them in storage order and then sorting
(although that is debatable given your dataset size).
Given the size of (3.5 * 10^6) rows versus the use of ROWS 1 TO 100
retrieving those first 100 in index order would probably have been more
efficient in this particular case, but Firebird doesn't seem to do that
- << Previous post in topic Next post in topic >>