Subject | Re: Problem with query with ORDER BY DESC |
---|---|
Author | Alexander V.Nevsky |
Post date | 2003-03-12T21:07:54Z |
--- In ib-support@yahoogroups.com, "Sandro Silveira" <sandro@r...>
wrote:
another, ascending, index:
PLAN (TTALAO INDEX (TT_CHA))
BTW, natural sort is often more quick than indexed. Indexed sort
more quickly returns first rows but natural one more quickly returns
whole cursor if we make fetchall. Performing indexed sort we force
Firebird make many reads index-data, index-data ... and time is wasted
to move disk heads and re-load cashe on large cursors.
Best regards, Alexander.
wrote:
> > Indices in Firebird are one-way only. That is, ASC or DESC. Try"TT_CCU"
> > creating DESCending indices as well and see if that matters.
> Already do this:
>
> CREATE UNIQUE DESCENDING INDEX "TT_CHA_DESC"
> ON "TTALAO"("TT_SIG", "TT_PED", "TT_LOT", "TT_PRG", "TT_TAL",
> );Sandro, are you sure? In your primary post you showed you forced
>
> In my execution plan i force this but is more slow than ascending
> order...
another, ascending, index:
PLAN (TTALAO INDEX (TT_CHA))
BTW, natural sort is often more quick than indexed. Indexed sort
more quickly returns first rows but natural one more quickly returns
whole cursor if we make fetchall. Performing indexed sort we force
Firebird make many reads index-data, index-data ... and time is wasted
to move disk heads and re-load cashe on large cursors.
Best regards, Alexander.