Subject | Re: [firebird-support] Re: PLAN SORT |
---|---|
Author | Alexandre Benson Smith |
Post date | 2007-08-07T22:40:29Z |
Adam wrote:
ordered read (aka index walking) in favor of an in memory sort (SORT plan)
AFAIK There is no way to avoid a sort if he is asking for a sorted
result set :-)
something like this:
select * from TableA order by FieldA
there is no way to not sort by FieldA if he is asking the result set sorted
well.. maybe I don't understood the original question.
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> No, it still does a sort. The only thing this will changeYes ! That's is exactly what I understood he is trying to avoid an
> PLAN (FOO ORDER PK_FOO)
>
> to
>
> PLAN SORT ((FOO NATURAL))
>
ordered read (aka index walking) in favor of an in memory sort (SORT plan)
AFAIK There is no way to avoid a sort if he is asking for a sorted
result set :-)
something like this:
select * from TableA order by FieldA
there is no way to not sort by FieldA if he is asking the result set sorted
well.. maybe I don't understood the original question.
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br