Re: Column correlation drifts, index ignored again - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Column correlation drifts, index ignored again
Date
Msg-id 200402221617.27658.josh@agliodbs.com
Whole thread Raw
In response to Re: Column correlation drifts, index ignored again  (John Siracusa <siracusa@mindspring.com>)
Responses Re: Column correlation drifts, index ignored again  (Kevin Brown <kevin@sysexperts.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: John Siracusa
Date:
Subject: Re: Column correlation drifts, index ignored again
Next
From: Sean Shanny
Date:
Subject: Re: General performance questions about postgres on Apple