Re: Index is not used - Mailing list pgsql-admin

From Tom Lane
Subject Re: Index is not used
Date
Msg-id 17155.1071939678@sss.pgh.pa.us
Whole thread Raw
In response to Re: Index is not used  (Ray Ontko <rayo@ontko.com>)
List pgsql-admin
Ray Ontko <rayo@ontko.com> writes:
> BTW, Are you sure that you need to do the "distinct"?

That's a good question to ask.

> If you do,
> then you might try putting the order_date column first in the
> select list.  The distinct is requiring that all the rows be sorted
> so that they can be uniqified.  I'm hoping that by putting order_date
> first in the that the sort will have to do less work to put them in
> order.  (Anyone know if this will actually help?)

I don't believe it will help much if at all.  Increasing sort_mem might
help, though.

            regards, tom lane

pgsql-admin by date:

Previous
From: Ray Ontko
Date:
Subject: Re: Index is not used
Next
From: Tom Lane
Date:
Subject: Re: Re2: Problm Drop Table :: 748580