From: Kevin Grittner <kgrittn@ymail.com>
To: Franck Routier <franck.routier@axege.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: What happens between end of explain analyze and end of query execution ?
Date: Sat, 6 Apr 2013 08:26:31 -0700 (PDT)
Message-ID: <1365261991.56886.YahooMailNeo@web162905.mail.bf1.yahoo.com> (raw)
In-Reply-To: <515FE547.3010301@axege.com>
References: <515D92BF.5000309@axege.com>
<CAPmjWd100eemBz1RTw=r24zgh8+YO8iq86fThqsALznrPuyWqg@mail.gmail.com>
<515D9FC5.7030105@axege.com>
<18910.1365092713@sss.pgh.pa.us>
<515DCB34.6040801@axege.com>
<6354.1365102532@sss.pgh.pa.us>
<515ED7BC.40907@axege.com>
<4113.1365171448@sss.pgh.pa.us>
<515FE547.3010301@axege.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Franck Routier <franck.routier@axege.com> wrote:
> Ok, the problem definitely comes from the
> default_statistics_target which is obviously too high on the
> database.
> Now... can someone help me understand what happens ? Where can I
> look (in pg_stats ?) to see the source of the problem ? maybe a
> column with a huge list of different values the palnner has to
> parse ?
This is a fundamental issue in query planning -- how much work do
you want to do to try to come up with the best plan? Too little,
and the plan can be unacceptably slow; too much and you spend more
extra time on planning than the improvement in the plan (if any)
saves you. Reading and processing statistics gets more expensive
as you boost the volume.
What I would suggest is taking the default_statistics_target for
the cluster back down to the default, and selectviely boosting the
statistics target for individual columns as you find plans which
benefit. Don't set it right at the edge of the tipping point, but
don't automatically jump to 5000 every time either.
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: kgrittn@ymail.com, franck.routier@axege.com
Subject: Re: What happens between end of explain analyze and end of query execution ?
In-Reply-To: <1365261991.56886.YahooMailNeo@web162905.mail.bf1.yahoo.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