Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp4s7-0008NQ-Ur for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2013 23:31:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vp4s7-0000k8-9J for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2013 23:31:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp4s6-0000k1-3o for pgsql-performance@postgresql.org; Fri, 06 Dec 2013 23:31:46 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vp4s3-0001IR-BH for pgsql-performance@postgresql.org; Fri, 06 Dec 2013 23:31:45 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 08950508D31 for ; Sat, 7 Dec 2013 00:31:41 +0100 (CET) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com Received: from mail.gransy.com ([82.208.44.189]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id NfIrDDtie3TZ for ; Sat, 7 Dec 2013 00:31:41 +0100 (CET) Received: by mail.gransy.com (Postfix, from userid 5000) id CB06A508D35; Sat, 7 Dec 2013 00:31:40 +0100 (CET) Received: from [192.168.1.227] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id B3DD9508D31 for ; Sat, 7 Dec 2013 00:31:40 +0100 (CET) Message-ID: <52A25E5C.9090405@fuzzy.cz> Date: Sat, 07 Dec 2013 00:31:40 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Reseting statistics counters References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 16.11.2013 20:49, Strahinja Kustudić wrote: > Sorry for the late reply, but as far as I know when you run > pg_stat_reset() you should always run analyze manually of the > database to populate the statistics. Why? There are two kinds of stats in the database - stats used by the planner (common column values, histograms, ...) and runtime stats. pg_stat_reset only deals with the latter, it won't discard histograms or anything like that. And runnning analyze won't magically populate the runtime stats - for example how could it populate number of sequential/index scans or the timestamp of the last autovacuum? The only thing that may be influenced by this is autovacuum, because this will remove timestamp of the last run on the tables, number of deleted/dead tuples etc. So it will be invoked on all tables, collecting this info. regards Tomas -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance