Subject | Re: [firebird-support] Adding second sort column slows down sorting 100-fold |
---|---|
Author | Alec Swan |
Post date | 2010-10-06T22:32:13Z |
Hello,
The "SELECT FIRST 1000 *" is interesting. Do you know how
implementing paginated query results. So, what is your recommendation here?
Thanks,
Alec
[Non-text portions of this message have been removed]
The "SELECT FIRST 1000 *" is interesting. Do you know how
> many rows the query would select without the "FIRST" clause?40,000 records would have been returned without "FIRST" clause.
>
> If it's a lot more than 1000, then the problem is thatThis seems like a pretty common problem people would run into when
> Firebird can't walk two indexes at once, so ordering by two
> fields with separate indexes requires that it retrieve all
> the qualifying rows, sort them, then throw out all the rows
> it selected after the first 1000.
>
implementing paginated query results. So, what is your recommendation here?
Thanks,
Alec
[Non-text portions of this message have been removed]