pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kaloyan Iliev Iliev <news1@faith.digsys.bg>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance problem from migrating between versions!
Date: Mon, 17 Jan 2005 13:07:20 -0500
Message-ID: <3957.1105985240@sss.pgh.pa.us> (raw)
In-Reply-To: <41EBFDBF.9040105@faith.digsys.bg>
References: <41EBDBBB.3070301@faith.digsys.bg>
	<2253.1105978380@sss.pgh.pa.us>
	<41EBFDBF.9040105@faith.digsys.bg>

Kaloyan Iliev Iliev <news1@faith.digsys.bg> writes:
> It worked. I have read in the docs what this "enable_hashagg" do, but I 
> couldn't understand it. What does it change?

Your original 7.4 query plan has several HashAgg steps in it, which are
doing aggregate/GROUP BY operations.  The planner thinks that they will
use only nominal amounts of memory because there are only a few distinct
groups in each case.  Evidently that is wrong and at least one of them
is dealing with so many groups as to run out of memory.  So the next
question is have you ANALYZEd all of these tables recently?

I wouldn't recommend turning off hashagg as a permanent solution, it
was just a quickie to verify my suspicion of where the memory was going.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <3957.1105985240@sss.pgh.pa.us>
Permalink:  ../3957.1105985240@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3957.1105985240@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, news1@faith.digsys.bg
  Subject: Re: Performance problem from migrating between versions!
  In-Reply-To: <3957.1105985240@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