pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: siracusa@mindspring.com, Postgres Performance <pgsql-performance@postgresql.org>
Subject: Re: Column correlation drifts, index ignored again
Date: Sun, 22 Feb 2004 16:17:27 -0800
Message-ID: <200402221617.27658.josh@agliodbs.com> (raw)
In-Reply-To: <BC5E98B7.2DCB2%siracusa@mindspring.com>
References: <BC5E98B7.2DCB2%siracusa@mindspring.com>

John,

> I think the key is to get the planner to correctly ballpark the number of
> rows in the date range.  If it does, I can't imagine it ever deciding to
> read 1,000,000 rows instead of 1,000 with any sane "cost" setting.  I'm
> assuming the defaults are sane :)

The default for random_page_cost is sane, but very conservative; it's pretty 
much assuming tables that are bigger than RAM and a single IDE disk.   If 
your setup is better than that, you can lower it.

For example, in the ideal case (database fits in RAM, fast RAM, CPU, and 
random seek on the disk), you can lower it to 1.5.    For less ideal 
situations, 1.8 to 2.5 is reasonable on high-end hardware.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




view thread (16+ messages)  latest in thread

Message-ID: <200402221617.27658.josh@agliodbs.com>
Permalink:  ../200402221617.27658.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200402221617.27658.josh@agliodbs.com

 · 

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: josh@agliodbs.com
  Subject: Re: Column correlation drifts, index ignored again
  In-Reply-To: <200402221617.27658.josh@agliodbs.com>

* 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