Subject | Re: How to improve descending query performance |
---|---|
Author | Sean |
Post date | 2007-06-15T17:20:41Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
PLAN SORT((A INDEX(PK_A)))
> I would attempt to trick it to read in storage order. Try this one:I tried it and it tooks 16 minutes. The plan chosen by firebird was:
>
> select first 1000 * from A
> where update_time >= '13-JUN-2006 00:00:00'
> and update_time <= '13-JUN-2007 00:00:00'
> and id <= 3000000
> and id >= 2000
> order by id+0 desc
>
PLAN SORT((A INDEX(PK_A)))