From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Odd problem with performance in duplicate database
Date: Mon, 11 Aug 2003 16:51:01 -0700
Message-ID: <200308111651.01597.josh@agliodbs.com> (raw)
In-Reply-To: <26934.1060644171@sss.pgh.pa.us>
References: <ENEDIMLCODBHILEONAOMAEBNCEAA.pdarley@kinesis-cem.com>
<200308111559.09924.josh@agliodbs.com>
<26934.1060644171@sss.pgh.pa.us>
Tom,
> Let's see the pg_stats rows for case_clients in both databases. The
> entries for trial_groups might be relevant too.
My reading is that the case is "borderline"; that is, becuase the correlation
is about 10-20% higher on the test database (since it was restored "clean"
from backup) the planner is resorting to a seq scan.
At which point the spectre of random_page_cost less than 1.0 rears its ugly
head again. Because the planner seems to regard this as a borderline case,
but it's far from borderline ... index scan takes 260ms, seq scan takes
244,000ms. Yet my random_page_cost is set pretty low already, at 1.5.
It seems like I'd have to set random_page_cost to less than 1.0 to make sure
that the planner never used a seq scan. Which kinda defies the meaning of
the setting.
*sigh* wish the client would pay for an upgrade ....
--
-Josh Berkus
Aglio Database Solutions
San Francisco
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us
Subject: Re: Odd problem with performance in duplicate database
In-Reply-To: <200308111651.01597.josh@agliodbs.com>
References: <ENEDIMLCODBHILEONAOMAEBNCEAA.pdarley@kinesis-cem.com> <200308111559.09924.josh@agliodbs.com> <26934.1060644171@sss.pgh.pa.us> <200308111651.01597.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