From: Steve McLellan <smclellan@mintel.com>
To: pgsql-performance@postgresql.org
Subject: Re: Query performance over a large proportion of data
Date: Tue, 10 Mar 2009 22:30:32 -0500
Message-ID: <cfca83d70903102030h3fdff9f6n6e55b4161a216a56@mail.gmail.com> (raw)
In-Reply-To: <OF1B71B564.4849794D-ON86257576.00117509-86257576.0011751F@MintelChicago.usdmm.com>
References: <OF1B71B564.4849794D-ON86257576.00117509-86257576.0011751F@MintelChicago.usdmm.com>
>
>
>
> *"Kevin Grittner" <Kevin.Grittner@wicourts.gov>*
> 03/10/2009 05:06 PM EST
>
> > enable_seqscan = off
>
> Not a good idea; some queries will optimize better with seqscans.
> You can probably get the behavior you want using other adjustments.
>
The bullet to cure the headache, as Scott said.
>
> You probably need to reduce random_page_cost. If your caching is
> complete enough, you might want to set it equal to seq_page_cost
> (never set it lower that seq_page_cost!) and possibly reduce both of
> these to 0.1.
>
> Reducing seq_page_cost relative to random_page_cost seems to make an
enormous difference for this query. Removing the nested loop seems to be
what makes a difference. We'll continue to play with these and check there
are no adverse effects on other queries.
Thanks again, Steve
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: smclellan@mintel.com
Subject: Re: Query performance over a large proportion of data
In-Reply-To: <cfca83d70903102030h3fdff9f6n6e55b4161a216a56@mail.gmail.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