Subject Re: [firebird-support] Re: How to mix ascending and descending fields in one index
Author Martijn Tonies
----- Original Message -----
From: "kokok_kokok" <kokok_kokok@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, October 08, 2009 3:30 PM
Subject: [firebird-support] Re: How to mix ascending and descending fields
in one index


> The query is a basic example, in reality the consult is paged. It sends
> the partial results from the middle tier to the client tier. The client
> tier gets the next "page" of records in each user iteration.
>
> I need the results to be indexed, in other case, if the sort is after the
> read the entire table, the costs is not viable since it can have millions
> of records. For example, using the index (a,b), the result is in 0.01
> seconds, if the index is not used, the result can take 20 seconds or more.
> In few words, index is absolutely necessary.
>

You want to transfer millions of records to the client?

> It works really fine using the index (a,b), but I would need (a desc, b).
> This composed index is possible in other SQL platforms, but I cannot see
> the way in FB.
>

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com