pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: ken <southerland@samsixedd.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Index oddity
Date: Thu, 10 Jun 2004 09:45:14 +0800
Message-ID: <40C7BD2A.70604@familyhealth.com.au> (raw)
In-Reply-To: <1086822662.32077.278.camel@pesky>
References: <1086809460.32077.246.camel@pesky>
	<1086811930.2539.90.camel@jester>
	<1086814209.32077.252.camel@pesky>
	<1086814597.2539.92.camel@jester>
	<1086814928.32077.259.camel@pesky>
	<1086816543.2539.98.camel@jester>
	<1086822662.32077.278.camel@pesky>

> If I take away the diagonalSize condition in my query I find that there
> are 225 rows that satisfy the other conditions.  155 of these have a
> diagonalSize value of exactly 50.000, while the remaining 70 rows all
> have values larger than 50.  Thus there is a big discrete jump in the
> number of rows at a diagonalSize of 50.  However, the statistics are off
> by two orders of magnitude in guessing how many rows there are going to
> be in this case and thus is not using my index.  How can I fix that?

Maybe you should drop your random_page_cost to something less than 4, 
eg. 3 or even 2...

Chris



view thread (12+ messages)  latest in thread

Message-ID: <40C7BD2A.70604@familyhealth.com.au>
Permalink:  ../40C7BD2A.70604@familyhealth.com.au/
Also on:    postgresql.org/message-id/40C7BD2A.70604@familyhealth.com.au

 · 

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: chriskl@familyhealth.com.au, southerland@samsixedd.com
  Subject: Re: Index oddity
  In-Reply-To: <40C7BD2A.70604@familyhealth.com.au>

* 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