Re: Index oddity - Mailing list pgsql-performance

From Christopher Kings-Lynne
Subject Re: Index oddity
Date
Msg-id 40C7BD2A.70604@familyhealth.com.au
Whole thread Raw
In response to Re: Index oddity  (ken <southerland@samsixedd.com>)
Responses Re: Index oddity  (Rod Taylor <pg@rbt.ca>)
List pgsql-performance
> 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

pgsql-performance by date:

Previous
From: ken
Date:
Subject: Re: Index oddity
Next
From: Rod Taylor
Date:
Subject: Re: Index oddity