Re: Two different execution plan for the same request
От | JOUANIN Nicolas (44) |
---|---|
Тема | Re: Two different execution plan for the same request |
Дата | |
Msg-id | 4C34648B.1010103@dgfip.finances.gouv.fr обсуждение исходный текст |
Ответ на | Re: Two different execution plan for the same request (Guillaume Smet <guillaume.smet@gmail.com>) |
Ответы |
Re: Two different execution plan for the same request
|
Список | pgsql-performance |
<font size="-1"><font face="Arial">It seems to work fine (same execution plan and less duration) after :<br /> - settingdefault_statistics_target to 100<br /> - full vacuum with analyze<br /> - reindexdb<br /><br /> Thanks.<br /></font></font><br/><br /> -------- Message original --------<br /> Sujet : Re: [PERFORM] Two different execution plan forthe same request<br /> De : Guillaume Smet <a class="moz-txt-link-rfc2396E" href="mailto:guillaume.smet@gmail.com"><guillaume.smet@gmail.com></a><br/> Pour : JOUANIN Nicolas (44) <a class="moz-txt-link-rfc2396E" href="mailto:nicolas.jouanin@dgfip.finances.gouv.fr"><nicolas.jouanin@dgfip.finances.gouv.fr></a><br/> Copie à : YebHavinga <a class="moz-txt-link-rfc2396E" href="mailto:yebhavinga@gmail.com"><yebhavinga@gmail.com></a>, <a class="moz-txt-link-abbreviated"href="mailto:pgsql-performance@postgresql.org">pgsql-performance@postgresql.org</a><br />Date : 07/07/2010 10:59<br /><blockquote cite="mid:AANLkTimrF-p7o2iFzRcRFhH1hPbLT85SVoR6gxynKeRp@mail.gmail.com" type="cite"><prewrap="">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"><nicolas.jouanin@dgfip.finances.gouv.fr></a>wrote: </pre><blockquotetype="cite"><pre wrap="">There were no modification made on the database except a restart yesterday eveningand 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 />
В списке pgsql-performance по дате отправления: