Subject | Re: [firebird-support] Re: How to mix ascending and descending fields in one index |
---|---|
Author | Geoff Worboys |
Post date | 2009-10-09T07:01:39Z |
>>I must have missed that one.I guess that's why I missed it... to me the request seems very
> It's a reference to OP and others who expressed the belief
> that because "other databases" [database engines] could do
> it, Firebird should. [...]
reasonable, and was not (directly) a criticism of Firebird.
The OP stated that
"select * from foo order by a, b"
would use index (a,b) and return results in 0.01 seconds,
and seemed very happy with that performance.
What the OP wanted was to be able to get this statement:
"select * from foo order by a desc, b"
to operate with similar performance.
On the surface this seems a very reasonable expectation, even
when discussing Firebird.
The first example demonstrates that Firebird is quite capable
of producing the desired response - there are no technical or
theoretical matters to prevent this performance. It is not a
matter of whether Firebird could or should operate like other
databases, it simply the expecation that it should operate
like itself.
To the outside observer (who knows nothing of the implmentation
details behind Firebird's indexes) it appears that the only
thing stopping the second query from operating at the same
speed as the first is the syntactic peculiarity that prevents
the creation of an index with mixed ordering.
--
Geoff Worboys
Telesis Computing