Subject | Re: Indexing Questions |
---|---|
Author | Adam |
Post date | 2006-10-18T00:47:28Z |
--- In firebird-support@yahoogroups.com, "Anthony Tanas" <anthony@...>
wrote:
when it is used for sorting. Otherwise, neither has any benefit over
the other.
Adam
wrote:
>objects,
> > if your queries are mainly
> > ORDER BY APPOINTMENTDATE DESC
> >
> > then create a desc index on this field.
> > if your queries are mainly
> > ORDER BY APPOINTMENTDATE
> > then put a default ascending index on it.
>
> The queries I am concerned with are un-ordered. I load them into
> the order I select them in doesn't matter for my purpose.APPOINTMENTDATE =
>
> But I do select them based on APPOINTMENTDATE (i.e. 'WHERE
> :APPOINTMENTDATE')...I was thinking an index would improveperformance for
> it? And I was thinking since I mostly select more recent datesrelative to
> all the appointments in the table that descending was what I needed?No, the only difference between an ascending or descending index is
>
when it is used for sorting. Otherwise, neither has any benefit over
the other.
Adam