On Thu, Aug 25, 2011 at 2:48 AM, Gary Poster <gary.pos...@canonical.com> 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 <stu...@stuartbishop.net> http://www.stuartbishop.net/ _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp