Re: query produces 1 GB temp file

From: John A Meinel <john(at)arbash-meinel(dot)com>
To: lutzeb(at)aeccom(dot)com
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-performance(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: query produces 1 GB temp file
Date: 2005-02-06 15:19:08
Message-ID: 4206356C.9060308@arbash-meinel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dirk Lutzebaeck wrote:

> Greg,
>
> Thanks for your analysis. But I dont get any better after bumping
> STATISTICS target from 10 to 200.
> explain analyze shows that the optimizer is still way off estimating
> the rows. Is this normal? It still produces a 1 GB temp file.
> I simplified the query a bit, now only two tables are involved (bi,
> df). I also vacuumed.

Are you just doing VACUUM? Or are you doing VACUUM ANALYZE? You might
also try VACUUM ANALYZE FULL (in the case that you have too many dead
tuples in the table).

VACUUM cleans up, but doesn't adjust any planner statistics without ANALYZE.

John
=:->

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gaetano Mendola 2005-02-06 15:50:08 Re: horizontal partition
Previous Message Dirk Lutzebaeck 2005-02-06 13:27:17 Re: query produces 1 GB temp file