Subject Re: Index for ascending and descending order?
Author svanderclock
> PK is always indexed. Nothing prevent you from issuing query like this:
>
> select first 200 ... from table where pk_field>=gen_id(t_gen,0)-300
> order by pk_field DESC;

yes, if the PK_field is not an integer? also i gave a very simple exemple. most of the time the probleme is we don't know how much result will be given by the select (cause it's depend of the filter), and because of that we don't know with is the better way : using the index on the ordering or using the index on the filter ! the difference can be 1000 more slower if you choose one way instead of the other or vice versa ! that a big problem !