From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Odd explain estimate
Date: Thu, 31 Jul 2003 16:59:21 -0400
Message-ID: <20030731205921.GF16230@libertyrms.info> (raw)
In-Reply-To: <20030731195145.GD55392@nasby.net>
References: <20030731195145.GD55392@nasby.net>
On Thu, Jul 31, 2003 at 02:51:45PM -0500, Jim C. Nasby wrote:
> Why is pgsql estimating a cost of 100000000 for retire_today in this
> query? I analyzed it, and there's nothing very odd about it, other than
> it's a temp table.
>
> BTW, I had to set enable_seqscan=false to get this, otherwise it wants
That's why. When you do that, it just automatically adds 100000000
to the cost of a seqscan. It can't really disable it, because there
might be no other way to pull the result.
If you really needed to set enable_seqscan=false (did you really?
Are you sure that's not the cheapest way?), you might want to
investigate expainding the statistics on the indexed column,
increasing the correlation through clustering, and other such tricks.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: Odd explain estimate
In-Reply-To: <20030731205921.GF16230@libertyrms.info>
References: <20030731195145.GD55392@nasby.net> <20030731205921.GF16230@libertyrms.info>
* 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