pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Contzen <Michael.Contzen@dohle.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How slow is distinct - 2nd
Date: Fri, 04 Oct 2002 10:44:48 -0400
Message-ID: <20689.1033742688@sss.pgh.pa.us> (raw)
In-Reply-To: <NFBBLKLMPMLOHOLPGAFPIEMFCAAA.Michael Contzen@Dohle.com>
References: <NFBBLKLMPMLOHOLPGAFPIEMFCAAA.Michael Contzen@Dohle.com>

"Michael Contzen" <Michael.Contzen@dohle.com> writes:
> [ select distinct takes a long time on 7+ million rows ]

What do you have sort_mem set to?  The default value is mighty small,
and that would translate directly to poor performance in DISTINCT.

Still though, the speed differential against Oracle is surprising,
given that they don't seem to be using a fundamentally different
implementation.  Time to get out the profiler ...

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <20689.1033742688@sss.pgh.pa.us>
Permalink:  ../20689.1033742688@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20689.1033742688@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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Michael.Contzen@dohle.com
  Subject: Re: How slow is distinct - 2nd
  In-Reply-To: <20689.1033742688@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