|Subject||RE: [firebird-support] Indexing Questions|
> if your queries are mainlyThe queries I am concerned with are un-ordered. I load them into objects,
> 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 order I select them in doesn't matter for my purpose.
But I do select them based on APPOINTMENTDATE (i.e. 'WHERE APPOINTMENTDATE =
:APPOINTMENTDATE')...I was thinking an index would improve performance for
it? And I was thinking since I mostly select more recent dates relative to
all the appointments in the table that descending was what I needed?
> I would have, however, just made a timestamp field as oneGood point. :P
> filed which contain datetime - why did you separate them?
> Your client can still separate them for display and
> manipulation if that's what is wanted.