Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0EB4B9FB518 for ; Mon, 2 Apr 2007 05:42:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 14047-03 for ; Mon, 2 Apr 2007 05:42:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.rp-online.de (mail.rp-online.de [149.221.1.199]) by postgresql.org (Postfix) with ESMTP id DF0599FB2DD for ; Mon, 2 Apr 2007 05:42:33 -0300 (ADT) Received: from idefix.d.rp-online.de (idefix.d.rp-online.de [149.221.100.194]) by mail.rp-online.de (Postfix) with ESMTP id 5195C2FD38; Mon, 2 Apr 2007 10:42:32 +0200 (CEST) From: Thomas Pundt Reply-To: Thomas Pundt To: pgsql-performance@postgresql.org, "Denis Lishtovny" Subject: Re: How to determine which indexes are not using or using seldom in database Date: Mon, 2 Apr 2007 10:45:13 +0200 User-Agent: KMail/1.9.4 References: <20070402081739.696D19FB609@postgresql.org> In-Reply-To: <20070402081739.696D19FB609@postgresql.org> Organization: RP Online GmbH MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704021045.13239.mlists@rp-online.de> X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.10/RELEASE, bases: 02042007 #273358, status: clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL=0.207, BAYES_40=-0.185, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 X-Spam-Level: X-Archive-Number: 200704/5 X-Sequence-Number: 23882 Hi, On Monday 02 April 2007 10:12, Denis Lishtovny wrote: | I have a lot of tables and indexes in database. I must to determine which | indexes are not using or using seldon in databese . I enabled all posible | statistics in config but a can`t uderstand how to do this. | Thanks. Try "select * from pg_stat_user_indexes;" - that should give you a good start to look at. | p.s for example i need this to reduce database size for increase backup and | restore speed. Deleting indexes won't reduce backup size noticeably (but has impact on restore speed), if you use pg_dump for backup. Ciao, Thomas -- Thomas Pundt ---- http://rp-online.de/ ----