Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D68201337B47 for ; Fri, 24 Sep 2010 14:16:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 38534-05-5 for ; Fri, 24 Sep 2010 17:16:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.afilias.info (outbound.afilias.info [69.46.124.26]) by mail.postgresql.org (Postfix) with ESMTP id E819D1337B7B for ; Fri, 24 Sep 2010 14:16:14 -0300 (ADT) Received: from ms5.yyz2.afilias-ops.info ([10.50.129.111] helo=smtp.afilias.info) by outbound.afilias.info with esmtp (Exim 4.69) (envelope-from ) id 1OzBsb-0003Mn-9A for pgsql-performance@postgresql.org; Fri, 24 Sep 2010 17:16:13 +0000 Received: from tor-gateway.afilias.info ([199.15.87.4] helo=[10.10.46.12]) by smtp.afilias.info with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OzBsb-0001Lh-5U for pgsql-performance@postgresql.org; Fri, 24 Sep 2010 17:16:13 +0000 Message-ID: <4C9CDCDD.8000603@ca.afilias.info> Date: Fri, 24 Sep 2010 13:16:13 -0400 From: Brad Nicholson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100920 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Memory usage - indexes References: <865426.21884.qm@web39701.mail.mud.yahoo.com> In-Reply-To: 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=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/169 X-Sequence-Number: 40372 On 10-09-24 12:46 PM, Tobias Brox wrote: > On 24 September 2010 18:23, Bob Lunney wrote: >> Consult pg_statio_user_indexes to see which indexes have been used >> and how much. > What is the main differences between pg_statio_user_indexes and > pg_stat_user_indexes? > The pg_stat_* views give you usage information (for indexes - number of scans, numbers of tuples read/fetched). The pg_statio_* views give you information about block reads and block hits > I'm not at all concerned about 1 and 2 above - we don't have any > performance issues on the write part, and we have plenty of disk > capacity. We are still doing the nightly vacuum thing, and it does > hurt us a bit since it's dragging ever more out in time. Why is the vacuum dragging out over time? Is the size of your data increasing, are you doing more writes that leave dead tuples, or are your tables and/or indexes getting bloated? Also, is there a reason why you do nightly vacuums instead of letting autovacuum handle the work? We started doing far less vacuuming when we let autovacuum handle things. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.