On Thu, Oct 03, 2002 at 19:30:59 -0700,
  Josh Berkus <[EMAIL PROTECTED]> wrote:
> Vincent,
> 
> > SELECT * FROM TABLE1 ORDER BY X DESC, Y ASC;
> > 
> > (X is a date and Y a varchar)
> > 
> > What would that index be?
> > 
> > Is there a function I can use, to invert x (the date), so that I can
> > make a query / index set like :
> 
> PostgreSQL's sorting mechanism can use an index either ascending or
> descending; it does not make a difference.

Note this is referring to a multicolumn index. To use all columns of
a multicolumn index the sort directions all need to be the same.

However you are right to point out that this may not be a big deal for
many applications where using the index on the first column gets the
majority of the speed up.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to