pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mischa Sandberg <ischamay.andbergsay@activestateway.com>
To: pgsql-performance@postgresql.org
Subject: Re: sequential scan on select distinct
Date: Thu, 07 Oct 2004 20:00:04 GMT
Message-ID: <8fh9d.25089$MV5.20638@clgrps13> (raw)
In-Reply-To: <199.1097170001@sss.pgh.pa.us>
References: <200410061130.58625.ole@freiheit.com>
	<29194.1097091506@sss.pgh.pa.us>
	<opsfh00bfrcq72hf@musicbox>
	<200410071921.08685.ole@freiheit.com>
	<199.1097170001@sss.pgh.pa.us>

Tom Lane wrote:
> Ole Langbehn <ole@freiheit.com> writes:
> 
>>>What do you think about the idea of an "UniqueSort" which would do
>>>sort+unique in one pass ? 
> 
>>This is what oracle does and it is quite fast with it...

> Hashing is at least as fast, if not faster.
> 
> 			regards, tom lane

I got good mileage in a different SQL engine, by combining the 
hash-aggregate and sort nodes into a single operator.
The hash table was just an index into the equivalent of the heap used 
for generating runs. That gave me partially aggregated data,
or eliminated duplicate keys, without extra memory overhead of the 
hash-aggregation node below the sort. Memory was scarce then ... :-)

BTW I'm really puzzled that Oracle is pushing 'index skip scan' as a new 
feature. Wasn't this in the original Oracle Rdb --- one of Gennady 
Antoshenkov's tweaks?



view thread (14+ messages)  latest in thread

Message-ID: <8fh9d.25089$MV5.20638@clgrps13>
Permalink:  ../8fh9d.25089$MV5.20638@clgrps13/
Also on:    postgresql.org/message-id/8fh9d.25089$MV5.20638@clgrps13

 · 

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: ischamay.andbergsay@activestateway.com
  Subject: Re: sequential scan on select distinct
  In-Reply-To: <8fh9d.25089$MV5.20638@clgrps13>

* 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