pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ray Ontko <rayo@ontko.com>
Cc: A.Bhuvaneswaran <bhuvan@symonds.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Index is not used
Date: Sat, 20 Dec 2003 12:01:18 -0500
Message-ID: <17155.1071939678@sss.pgh.pa.us> (raw)
In-Reply-To: <20031220144752.GA30502@ontko.com>
References: <1071894514.1380.1.camel@Bhuvan.bksys.co.in>
	<14302.1071895143@sss.pgh.pa.us>
	<1071900746.1380.57.camel@Bhuvan.bksys.co.in>
	<20031220144752.GA30502@ontko.com>

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



view thread (5+ messages)

Message-ID: <17155.1071939678@sss.pgh.pa.us>
Permalink:  ../17155.1071939678@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17155.1071939678@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rayo@ontko.com, bhuvan@symonds.net
  Subject: Re: Index is not used
  In-Reply-To: <17155.1071939678@sss.pgh.pa.us>
  References: <1071894514.1380.1.camel@Bhuvan.bksys.co.in> <14302.1071895143@sss.pgh.pa.us> <1071900746.1380.57.camel@Bhuvan.bksys.co.in> <20031220144752.GA30502@ontko.com> <17155.1071939678@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox