> My first attempt would be to create an index for each individual field.
> Firebird could combine 2 or more indices to narrow down the result set.
> So if you have 10 fields, you will need only 10 indices and not every
> possible combination.
>
> The sort will be in memory (as far as you have enough memory of course),
> a Quick Sort on 10 000 records should be instantaneous.
>
> see you !
this what we do now. but how to detect when a result set will gave you only 10 000 rows and not in some other case 2 000 000 row (or more) ! how to say to firebird : if more than 2 000 000 then don't do the order by ! no way so in this case no choice than use an index in all possible combination ...