X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 9823A9FB216 for ; Sat, 15 Jul 2006 17:04:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 47875-07 for ; Sat, 15 Jul 2006 20:04:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from joeconway.com (wsip-68-15-9-201.sd.sd.cox.net [68.15.9.201]) by postgresql.org (Postfix) with ESMTP id 222559FB210 for ; Sat, 15 Jul 2006 17:04:34 -0300 (ADT) Received: from [192.168.4.40] (account jconway [192.168.4.40] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 4050702; Sat, 15 Jul 2006 13:04:34 -0700 Message-ID: <44B94A51.9050108@joeconway.com> Date: Sat, 15 Jul 2006 13:04:33 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gabriele Turchi CC: Michael Fuhr , pgsql-performance@postgresql.org, Marco Colombo Subject: Re: Big differences in plans between 8.0 and 8.1 References: <1152972852.3541.0.camel@apollo5.casa.intranet> <20060715190210.GA76277@winnie.fuhr.org> <1152993350.3541.22.camel@apollo5.casa.intranet> In-Reply-To: <1152993350.3541.22.camel@apollo5.casa.intranet> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/153 X-Sequence-Number: 20013 Gabriele Turchi wrote: > Running an ANALYZE really change the plan, now it is fast as before > (8.0). > > On the production system a VACUUM FULL ANALYZE is run every morning > after a clean-up, when the "registrazioni" table is empty. During the > day this table fills up (about 500 record any day), and apparently the > performances are free-falling very quickly. This behaviour has not > changed between the old and the new installation. > > Can you suggest an easy way to collect and keep up-to-date these > statistics in a very low-impact way? > Why not just periodically (once an hour?) run "ANALYZE registrazioni;" during the day. This will only update the statistics, and should be very low impact. HTH, Joe