Subject Re: [firebird-support] Re: Table with more than 100 index.
Author Mon Mariola
The only solution to this problem is to maintain an auxiliary table for each
field in the main table with the fields "value" and "counter" . Use triggers
on the main table to maintain these tables. Then you can quickly get the
amount of records that meet each criterion, without having to go all the
records in the main table and decide from that value.

Ruben Marti.

----- Original Message -----
From: svanderclock
Sent: Monday, December 07, 2009 7:58 PM
Subject: [firebird-support] Re: Table with more than 100 index.

> The performance problem of the queries where total result set is
> 2 million rows is not sorting, but simply retrieving all those
> rows. I wish that the "first"/"limit" type queries had never
> been invented and designers were forced to think about the selectivity
> of queries rather than just "what the heck, select two million and
> throw out one million nine hundred ninety-nine thousand seven hundred
> and fifty rows."

i agree, but if i could know when a query will return 2 000 000 rows
before to launch it it's will be great ! unfortunatly no way ... without the
order by everything i perfect but because of the #{^[\| order by it's a hell

[Non-text portions of this message have been removed]