pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: 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 13:01:51 -0400
Message-ID: <22514.1087578111@sss.pgh.pa.us> (raw)
In-Reply-To: <20040618163003.GM11196@ns.snowman.net>
References: <20040618132554.72968.qmail@web25103.mail.ukl.yahoo.com>
	<20412.1087570627@sss.pgh.pa.us>
	<20040618163003.GM11196@ns.snowman.net>

Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> [... thinks for awhile ...]  It seems possible that they may use sort
>> code that knows it is performing a DISTINCT operation and discards
>> duplicates on sight.  Given that there are only 534 distinct values,
>> the sort would easily stay in memory if that were happening.

> Could this optimization be added to PostgreSQL?  It sounds like a very
> reasonable thing to do.

That's what I was wondering about too.  But first I'd like to get
some kind of reading on how effective it would be.  If someone can
demonstrate that Oracle can do sort-and-drop-dups a lot faster than
it can do a straight sort of the same amount of input data, that
would be a strong indication that it's worth doing.  At this point
we don't know if that's the source of their win or not.

			regards, tom lane



view thread (18+ messages)  latest in thread

Message-ID: <22514.1087578111@sss.pgh.pa.us>
Permalink:  ../22514.1087578111@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22514.1087578111@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, gary_cowell@yahoo.co.uk
  Subject: Re: Major differences between oracle and postgres performance - what can I do ?
  In-Reply-To: <22514.1087578111@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