From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Wayne Conrad <wayne@databill.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 8.4.7, incorrect estimate
Date: Fri, 29 Apr 2011 16:58:21 -0400
Message-ID: <13918.1304110701@sss.pgh.pa.us> (raw)
In-Reply-To: <4DBACC43020000250003D070@gw.wicourts.gov>
References: <4DBB024B.5050500@databill.com>
<4DBACC43020000250003D070@gw.wicourts.gov>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Also, make sure that you run ANALYZE against your temp table right
> before running your query.
Yeah. It's fairly hard to credit that temp_document_ids has any stats
given the way-off estimates for it. Keep in mind that autovacuum
can't help you on temp tables: since only your own session can
access a temp table, you have to ANALYZE it explicitly if you need
the planner to have decent stats about it.
regards, tom lane
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, Kevin.Grittner@wicourts.gov, wayne@databill.com
Subject: Re: 8.4.7, incorrect estimate
In-Reply-To: <13918.1304110701@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