From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan Bradetich <ryan_bradetich@hp.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: Use of index in 7.0 vs 6.5
Date: Wed, 24 May 2000 23:12:32 -0400
Message-ID: <19295.959224352@sss.pgh.pa.us> (raw)
In-Reply-To: <392C6056.D5BF7FE8@hp.com>
References: <392C6056.D5BF7FE8@hp.com>
Ryan Bradetich <ryan_bradetich@hp.com> writes:
> I am in the process of transitioning from postgreSQL 6.5.3 to
> postgreSQL 7.0. I ran into an issue where a sequential scan
> is being choosen on postgreSQL 7.0 where an index scan was
> choosen on postgreSQL 6.5.3.
Since you're complaining, I assume the seqscan is slower ;-).
But you didn't say how much slower --- what are the actual timings?
Basically what's going on here is that we need to tune the fudge-factor
constants in the cost model so that they have something to do with
reality on as wide a variety of systems as possible. You did an
excellent job of showing the estimates the planner computed --- but
what we really need here is to see how those relate to reality.
> I do not understand why the planner would choose a seqscan over the
> index scan because 6704/4,630,229 is ~ 0.15%.
I'm a bit surprised too. What is the average tuple width on this table?
(Actually, probably a better question is how many pages and tuples
are in the relation according to its pg_class entry. Try "select * from
pgclass where relname = 'medusa'".)
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, ryan_bradetich@hp.com
Subject: Re: Use of index in 7.0 vs 6.5
In-Reply-To: <19295.959224352@sss.pgh.pa.us>
References: <392C6056.D5BF7FE8@hp.com> <19295.959224352@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