From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rod Taylor <rbt@rbt.ca>
Cc: Rob Messer <rrmesser@yahoo.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Optimizer not using index when it should
Date: Tue, 29 Apr 2003 10:18:19 -0400
Message-ID: <26349.1051625899@sss.pgh.pa.us> (raw)
In-Reply-To: <1051621449.76105.9.camel@jester>
References: <20030429090301.13152.qmail@web41213.mail.yahoo.com>
<1051621449.76105.9.camel@jester>
Rod Taylor <rbt@rbt.ca> writes:
>> What can I do to fix this -- is there something I am missing about
>> setting statistics or some configuration variable I can change? Any
>> insights would be greatly appreciated. Thank you,
> You might try adjusting the random_page_cost down to something more
> appropriate for your hardware and situation.
Also, is the table physically ordered by dsid? If so, is that condition
likely to persist? You may be looking at a test-condition artifact
here --- a poor estimate for an ordered table may not mean much when
you get to realistic database states.
I assume you've done an ANALYZE of course --- what does the pg_stats row
for column dsid contain?
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 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: tgl@sss.pgh.pa.us, rbt@rbt.ca, rrmesser@yahoo.com
Subject: Re: Optimizer not using index when it should
In-Reply-To: <26349.1051625899@sss.pgh.pa.us>
References: <20030429090301.13152.qmail@web41213.mail.yahoo.com> <1051621449.76105.9.camel@jester> <26349.1051625899@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