From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gary Cowell <gary_cowell@yahoo.co.uk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Major differences between oracle and postgres performance - what can I do ?
Date: Fri, 18 Jun 2004 16:47:17 -0400
Message-ID: <25464.1087591637@sss.pgh.pa.us> (raw)
In-Reply-To: <20040618154721.37105.qmail@web25105.mail.ukl.yahoo.com>
References: <20040618154721.37105.qmail@web25105.mail.ukl.yahoo.com>
=?iso-8859-1?q?Gary=20Cowell?= <gary_cowell@yahoo.co.uk> writes:
> So it seems the idea that oracle is dropping duplicate
> rows prior to the sort when using distinct may indeed
> be the case.
Okay. We won't have any short-term solution for making DISTINCT do that,
but if you are on PG 7.4 you could get the same effect from using
GROUP BY: instead of
select distinct version from vers where version is not null
try
select version from vers where version is not null group by version
You should get a HashAggregate plan out of that, and I'd think it'd be
pretty quick when there are not many distinct values of version.
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, gary_cowell@yahoo.co.uk
Subject: Re: Major differences between oracle and postgres performance - what can I do ?
In-Reply-To: <25464.1087591637@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