Re: Optimizer Selecting Incorrect Index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: David Price <dprice(at)dentfirst(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizer Selecting Incorrect Index
Date: 2004-08-25 19:08:01
Message-ID: 2137.1093460881@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Treat 2004-08-25 21:09:37 Anyone familiar with Apple Xserve RAID
Previous Message Josh Berkus 2004-08-25 16:59:15 Re: What is the best way to do attribute/values?