pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Huxton <dev@archonet.com>
Cc: David Price <dprice@dentfirst.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizer Selecting Incorrect Index
Date: Wed, 25 Aug 2004 15:08:01 -0400
Message-ID: <2137.1093460881@sss.pgh.pa.us> (raw)
In-Reply-To: <412CB487.6060704@archonet.com>
References: <OJEEJPPOBPODJFPEOFAGEEBMCGAA.dprice@dentfirst.com>
	<412CB487.6060704@archonet.com>

Richard Huxton <dev@archonet.com> writes:
> Things to check:
> 1. postgresql.conf settings match - different costs could cause this
> 2. statistics on the two columns (trn_patno,trn_old_date) - if they 
> differ considerably between systems that would also explain it.

The different estimated row counts could only come from #2.  I suspect
David has forgotten to run ANALYZE on the second system.

I agree that EXPLAIN VERBOSE output is not helpful...

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <2137.1093460881@sss.pgh.pa.us>
Permalink:  ../2137.1093460881@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2137.1093460881@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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dev@archonet.com, dprice@dentfirst.com
  Subject: Re: Optimizer Selecting Incorrect Index
  In-Reply-To: <2137.1093460881@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