launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07811
Re: increase our Postgres statistics targets
On Thu, Aug 25, 2011 at 2:48 AM, Gary Poster <gary.poster@xxxxxxxxxxxxx> wrote:
> Hi Stuart. When working on https://wiki.canonical.com/IncidentReports/2011-08-19-LP-confused-query-plan-degraded-performance , you noted that we should increase our Postgres statistics targets to make similar glitches less likely.
>
> Am I right in assuming that this means increasing the frequency of updating the statistics targets? What can we do to make this happen? Does it have any downsides? Should I file a bug for it, or make some other future-planning action?
It means that when PostgreSQL generates statistics for a table for the
query planner to use, it samples more rows. This makes ANALYZE take
longer, but no problems there since it is a background task and we
have spare capacity. The more rows you sample, the less likely you are
to get an anomalous sample.
I've added this to my list and opened
https://bugs.launchpad.net/launchpad/+bug/833502 if people want to
track or link to it.
--
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/
Follow ups
References