X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7F3209FB340 for ; Wed, 20 Sep 2006 09:22:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 59203-02 for ; Wed, 20 Sep 2006 09:21:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ebrsrv01.ebravo.it (host53-205-static.34-85-b.business.telecomitalia.it [85.34.205.53]) by postgresql.org (Postfix) with ESMTP id A4CF89FA1AF for ; Wed, 20 Sep 2006 09:21:56 -0300 (ADT) Received: from [192.168.11.103] ([192.168.11.103]) by ebrsrv01.ebravo.it (8.11.6/8.12.5) with ESMTP id k8KCLjD13411 for ; Wed, 20 Sep 2006 14:21:54 +0200 Message-ID: <45113286.2090204@streppone.it> Date: Wed, 20 Sep 2006 14:22:30 +0200 From: Cosimo Streppone User-Agent: Mozilla Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Postgresql Performance List Subject: Re: Update on high concurrency OLTP application and Postgres References: <45110543.6020501@streppone.it> <20060920110731.GB18219@phlogiston.dyndns.org> In-Reply-To: <20060920110731.GB18219@phlogiston.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/267 X-Sequence-Number: 20953 Andrew wrote: > On Wed, Sep 20, 2006 at 11:09:23AM +0200, Cosimo Streppone wrote: >> I scheduled a cron job every hour or so that runs an analyze on the >> 4/5 most intensive relations and sleeps 30 seconds between every >> analyze. > > This suggests to me that your statistics need a lot of updating. Agreed. > You _might_ find that setting the statistics to a higher number on some > columns of some of your tables will allow you to analyse less > frequently. At the moment, my rule of thumb is to check out the ANALYZE VERBOSE messages to see if all table pages are being scanned. INFO: "mytable": scanned xxx of yyy pages, containing ... If xxx = yyy, then I keep statistics at the current level. When xxx is way less than yyy, I increase the numbers a bit and retry. It's probably primitive, but it seems to work well. > [...] ANALYSE will impose an I/O load. In my case, analyze execution doesn't impact performance in any noticeable way. YMMV of course. -- Cosimo