Re: Performance problem from migrating between versions! - Mailing list pgsql-performance

From Tom Lane
Subject Re: Performance problem from migrating between versions!
Date
Msg-id 3957.1105985240@sss.pgh.pa.us
Whole thread Raw
In response to Re: Performance problem from migrating between versions!  (Kaloyan Iliev Iliev <news1@faith.digsys.bg>)
Responses Re: Performance problem from migrating between versions!
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Kaloyan Iliev Iliev
Date:
Subject: Re: Performance problem from migrating between versions!
Next
From: PFC
Date:
Subject: Re: Index on a function and SELECT DISTINCT