pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John A Meinel <john@arbash-meinel.com>
To: lutzeb@aeccom.com
Cc: Greg Stark <gsstark@mit.edu>
Cc: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: query produces 1 GB temp file
Date: Sun, 06 Feb 2005 09:19:08 -0600
Message-ID: <4206356C.9060308@arbash-meinel.com> (raw)
In-Reply-To: <42061B35.6000306@aeccom.com>
References: <20050205182117.0125074@mail2.aeccom.com>
	<87y8e2kb8j.fsf@stark.xeocode.com>
	<42061B35.6000306@aeccom.com>

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
=:->

Attachments:

  signature.asc (application/pgp-signature, 252B) download

view thread (24+ messages)  latest in thread

Message-ID: <4206356C.9060308@arbash-meinel.com>
Permalink:  ../4206356C.9060308@arbash-meinel.com/
Also on:    postgresql.org/message-id/4206356C.9060308@arbash-meinel.com

 · 

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: john@arbash-meinel.com, lutzeb@aeccom.com, gsstark@mit.edu, tgl@sss.pgh.pa.us
  Subject: Re: query produces 1 GB temp file
  In-Reply-To: <4206356C.9060308@arbash-meinel.com>

* 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