pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurent Martelli <laurent@aopsys.com>
To: PFC <lists@boutiquenumerique.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Speeding up select distinct
Date: Wed, 16 Mar 2005 19:29:54 +0100
Message-ID: <87fyyv4f6l.fsf@stan.aopsys> (raw)
In-Reply-To: <opsnqsmjvlth1vuj@localhost>
References: <87k6o74gms.fsf@stan.aopsys>
	<opsnqsmjvlth1vuj@localhost>

Wow, what a fast response !!!

>>>>> "PFC" == PFC  <lists@boutiquenumerique.com> writes:

  PFC> 	Try :

  PFC> 	SELECT owner from pictures group by owner;

That's a slight improvement, but there's still a seq scan on pictures:

 HashAggregate  (cost=114.38..114.38 rows=21 width=4) (actual time=7.585..7.605 rows=21 loops=1)
   ->  Seq Scan on pictures  (cost=0.00..103.70 rows=4270 width=4) (actual time=0.015..3.272 rows=4270 loops=1)
 Total runtime: 7.719 ms




-- 
Laurent Martelli
laurent@aopsys.com                                Java Aspect Components
http://www.aopsys.com/                          http://jac.objectweb.org




view thread (10+ messages)  latest in thread

Message-ID: <87fyyv4f6l.fsf@stan.aopsys>
Permalink:  ../87fyyv4f6l.fsf@stan.aopsys/
Also on:    postgresql.org/message-id/87fyyv4f6l.fsf@stan.aopsys

 · 

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: laurent@aopsys.com, lists@boutiquenumerique.com
  Subject: Re: Speeding up select distinct
  In-Reply-To: <87fyyv4f6l.fsf@stan.aopsys>

* 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