Re: query tuning

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Dave Cramer <dave(at)fastcrypt(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: query tuning
Date: 2003-08-18 15:54:55
Message-ID: Pine.LNX.4.33.0308180953270.7025-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-08-18 15:55:30 Re: Hour difference?
Previous Message Hervé Piedvache 2003-08-18 15:54:41 Re: Why lower's not accept an AS declaration ?