From: Mischa Sandberg <mischa_sandberg@telus.net>
To: pgsql-performance@postgresql.org
Subject: Re: Major differences between oracle and postgres performance - what can I do ?
Date: Tue, 22 Jun 2004 04:46:44 GMT
Message-ID: <UQOBc.1841$E84.931@edtnps89> (raw)
References: <20040618132554.72968.qmail@web25103.mail.ukl.yahoo.com>
<20412.1087570627@sss.pgh.pa.us>
<20040618163003.GM11196@ns.snowman.net>
<22514.1087578111@sss.pgh.pa.us>
Don't know about Oracle, but select-distinct in MSSQL2K will indeed throw
away duplicates, which chops the CPU time. Very easy to see in the graphic
query plan, both in terms of CPU and the number of rows retrieved from a
single-node or nested-loop subtree. Definitely a worthwhile optimization.
"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:22514.1087578111@sss.pgh.pa.us...
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
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: mischa_sandberg@telus.net
Subject: Re: Major differences between oracle and postgres performance - what can I do ?
In-Reply-To: <UQOBc.1841$E84.931@edtnps89>
* 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