On 14 Aug 2003, Dave Cramer wrote:
> I have a query which definitely runs faster when sequential scans are
> turned off. Which parameters do I tune? and which way?
>
> After quickly perusing the docs, and google, I think it is the
> random_page_cost?
Set your effective_cache_size correctly first, then lower random page cost
until you hit the sweet spot.
As someone else pointed out, you can also lower the cpu_***_cost
parameters, and often this is preferable. On boxes with fast memory /
CPUs, it's often good to get the planner in the state of mind of using the
CPU a little more, so it will pick a faster join method than it otherwise
would.