pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-performance@postgresql.org
Subject: Re: An unresolved performance problem.
Date: Thu, 08 May 2003 10:42:55 -0400
Message-ID: <20336.1052404975@sss.pgh.pa.us> (raw)
In-Reply-To: <20030508112020.GB3728@libertyrms.info>
References: <Pine.LNX.4.44.0305071700530.28446-100000@matrix.gatewaynet.com>
	<Pine.LNX.4.44.0305081013350.422-100000@matrix.gatewaynet.com>
	<20030508112020.GB3728@libertyrms.info>

Andrew Sullivan <andrew@libertyrms.info> writes:
> On Thu, May 08, 2003 at 10:48:52AM -0200, Achilleus Mantzios wrote:
>> That is, we have a marginal decrease of the total cost
>> for the index scan when random_page_cost = 1.9,
>> whereas the "real cost" in the means of total runtime
>> ranges from 218 msecs (seq scan) to 19 msecs (index scan).
>> (is it sane?)

> You're right that the problem is the poor estimate of the cost of
> that selection.

Are the table and index orders the same?  Oliver Elphick pointed out
awhile ago that we're doing a bad job of index order correlation
estimation for multi-column indexes --- the correlation is taken to
be much lower than it should be.  But if the correlation is near
zero anyway then this wouldn't explain Achilleus' problem...

			regards, tom lane




view thread (20+ messages)  latest in thread

Message-ID: <20336.1052404975@sss.pgh.pa.us>
Permalink:  ../20336.1052404975@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20336.1052404975@sss.pgh.pa.us

 · 

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-performance@postgresql.org
  Subject: Re: An unresolved performance problem.
  In-Reply-To: <20336.1052404975@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