Re: Index is not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ray Ontko <rayo(at)ontko(dot)com>
Cc: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Index is not used
Date: 2003-12-20 17:01:18
Message-ID: 17155.1071939678@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ray Ontko <rayo(at)ontko(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-12-20 17:11:53 Re: Re2: Problm Drop Table :: 748580
Previous Message Ray Ontko 2003-12-20 14:47:52 Re: Index is not used