pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: martial.bizel@free.fr
To: pgsql-performance@postgresql.org
Subject: Re: explain hashAggregate
Date: Wed, 15 Feb 2006 16:56:07 +0100
Message-ID: <1140018967.43f34f1761803@imp2-g19.free.fr> (raw)
In-Reply-To: <1140018387.43f34cd36a076@imp2-g19.free.fr>
References: <20060215090446.2F3AC1B819F@mx1.hub.org>
	<1140018387.43f34cd36a076@imp2-g19.free.fr>

Good morning,

I try to understand how optimizer uses HashAggregate instead of GroupAggregate
and I want to know what is exactly this two functionnality (benefits
/inconvenients)

In my case, I've this explain plan.
-----------------------
 Nested Loop  (cost=2451676.23..2454714.73 rows=1001 width=34)
   ->  Subquery Scan "day"  (cost=2451676.23..2451688.73 rows=1000 width=16)
         ->  Limit  (cost=2451676.23..2451678.73 rows=1000 width=12)
               ->  Sort  (cost=2451676.23..2451684.63 rows=3357 width=12)
                     Sort Key: sum(occurence)
                     ->  HashAggregate  (cost=2451471.24..2451479.63 rows=3357
width=12)
                           ->  Index Scan using test_date on
queries_detail_statistics  (cost=0.00..2449570.55 rows=380138 width=12)
                                 Index Cond: ((date >= '2006-01-01'::date) AND
(date <= '2006-01-30'::date))
                                 Filter: (((portal)::text = '1'::text) OR
((portal)::text = '2'::text))
   ->  Index Scan using query_string_pkey on query_string  (cost=0.00..3.01
rows=1 width=34)
         Index Cond: ("outer".query = query_string.id)
----------------------------
How to get necessary memory RAM for this explain plan ?



thanks a lot




Message-ID: <1140018967.43f34f1761803@imp2-g19.free.fr>
Permalink:  ../1140018967.43f34f1761803@imp2-g19.free.fr/
Also on:    postgresql.org/message-id/1140018967.43f34f1761803@imp2-g19.free.fr

 · 

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: martial.bizel@free.fr
  Subject: Re: explain hashAggregate
  In-Reply-To: <1140018967.43f34f1761803@imp2-g19.free.fr>

* 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