pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JOUANIN Nicolas (44) <nicolas.jouanin@dgfip.finances.gouv.fr>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: Yeb Havinga <yebhavinga@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Two different execution plan for the same request
Date: Wed, 07 Jul 2010 13:27:07 +0200
Message-ID: <4C34648B.1010103@dgfip.finances.gouv.fr> (raw)
In-Reply-To: <AANLkTimrF-p7o2iFzRcRFhH1hPbLT85SVoR6gxynKeRp@mail.gmail.com>
References: <4C3432F0.1090004@dgfip.finances.gouv.fr>
	<4C343A59.7050908@gmail.com>
	<4C343F31.2050402@dgfip.finances.gouv.fr>
	<AANLkTimrF-p7o2iFzRcRFhH1hPbLT85SVoR6gxynKeRp@mail.gmail.com>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Arial">It seems to work fine (same
execution plan and less duration) after :<br>
&nbsp;- setting default_statistics_target to 100<br>
&nbsp;- full vacuum with analyze<br>
&nbsp;- reindexdb<br>
<br>
Thanks.<br>
</font></font><br>
<br>
-------- Message original --------<br>
Sujet&nbsp;: Re: [PERFORM] Two different execution plan for the same request<br>
De&nbsp;: Guillaume Smet <a class="moz-txt-link-rfc2396E" href="mailto:guillaume.smet@gmail.com">&lt;guillaume.smet@gmail.com&gt;</a><br>
Pour&nbsp;: JOUANIN Nicolas (44)
<a class="moz-txt-link-rfc2396E" href="mailto:nicolas.jouanin@dgfip.finances.gouv.fr">&lt;nicolas.jouanin@dgfip.finances.gouv.fr&gt;</a><br>
Copie &agrave;&nbsp;: Yeb Havinga <a class="moz-txt-link-rfc2396E" href="mailto:yebhavinga@gmail.com">&lt;yebhavinga@gmail.com&gt;</a>,
<a class="moz-txt-link-abbreviated" href="mailto:pgsql-performance@postgresql.org">pgsql-performance@postgresql.org</a><br>
Date&nbsp;: 07/07/2010 10:59<br>
<blockquote
 cite="mid:AANLkTimrF-p7o2iFzRcRFhH1hPbLT85SVoR6gxynKeRp@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi Nicolas,

On Wed, Jul 7, 2010 at 10:47 AM, JOUANIN Nicolas (44)
<a class="moz-txt-link-rfc2396E" href="mailto:nicolas.jouanin@dgfip.finances.gouv.fr">&lt;nicolas.jouanin@dgfip.finances.gouv.fr&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">There were no modification made on the database except a restart yesterday evening and a vacuumdb --analyse ran at night.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
It's not really surprising considering you probably kept the
default_statistics_target to 10 (it's the default in 8.3).

Consider raising it to 100 in your postgresql.conf (100 is the default
for newer versions), then reload, and run a new ANALYZE.

You might need to set it higher on specific columns if you have a lot
of data and your data distribution is weird.

And, btw, please upgrade to the latest 8.3.x.

HTH

  </pre>
</blockquote>
<br>
</body>
</html>



view thread (7+ messages)  latest in thread

Message-ID: <4C34648B.1010103@dgfip.finances.gouv.fr>
Permalink:  ../4C34648B.1010103@dgfip.finances.gouv.fr/
Also on:    postgresql.org/message-id/4C34648B.1010103@dgfip.finances.gouv.fr

 · 

reply

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: nicolas.jouanin@dgfip.finances.gouv.fr, guillaume.smet@gmail.com, yebhavinga@gmail.com
  Subject: Re: Two different execution plan for the same request
  In-Reply-To: <4C34648B.1010103@dgfip.finances.gouv.fr>
  References: <4C3432F0.1090004@dgfip.finances.gouv.fr> <4C343A59.7050908@gmail.com> <4C343F31.2050402@dgfip.finances.gouv.fr> <AANLkTimrF-p7o2iFzRcRFhH1hPbLT85SVoR6gxynKeRp@mail.gmail.com> <4C34648B.1010103@dgfip.finances.gouv.fr>

* 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