Subject Re: [firebird-support] Re: How to mix ascending and descending fields in one index
Author Ann W. Harrison
Geoff ,
>
> There _are_ situations where you want to (quickly) return just
> the first few records of a potentially large set, especially
> in user-interactive environments. If Firebird's limitations
> prevent it from being optimised to achieve this easily in some
> cases (cannot easily create the indexes to make it happen)...
> then it is a limitation in Firebird, not (necessarily) an error
> in the requirements.
>

Yes. The original design decision not to mix ascending and
descending keys in an index was driven by testing that showed
that to return the entire record set, sorted, it was significantly
faster to fetch the records in storage order and sort them. Since
then, people who learn SQL application programming on other
systems have developed a style where the most important feature
is not the time to get the whole record set, but the time to
get the first record. And probably Firebird should provide
mixed order keys to support that style. It's not much harder
than providing full ascending and full descending keys - well
the problem of nulls first/last/high/low gets even less lovely,
but SMOP...

Worth thinking about post 2.5


Ann