Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 81B6F650215 for ; Tue, 22 Jul 2008 05:22:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19109-04-6 for ; Tue, 22 Jul 2008 05:22:20 -0300 (ADT) X-Greylist: delayed 00:31:02.004419 by SQLgrey-1.7.6 Received: from pooh.wsb.poznan.pl (pooh.wsb.poznan.pl [150.254.194.2]) by postgresql.org (Postfix) with ESMTP id 3B686650203 for ; Tue, 22 Jul 2008 05:19:42 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pooh.wsb.poznan.pl (Serwer pocztowy WSB) with ESMTP id F1648310054; Tue, 22 Jul 2008 09:48:34 +0200 (CEST) Received: from pooh.wsb.poznan.pl ([127.0.0.1]) by localhost (pooh.wsb.poznan.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uYJw5N3eHWzQ; Tue, 22 Jul 2008 09:48:34 +0200 (CEST) Received: from [192.168.0.98] (git.wsb.poznan.pl [150.254.194.75]) by pooh.wsb.poznan.pl (Serwer pocztowy WSB) with ESMTP id D707C31004E; Tue, 22 Jul 2008 09:48:34 +0200 (CEST) Message-ID: <488590D2.4080800@wsb.pl> Date: Tue, 22 Jul 2008 09:48:34 +0200 From: =?UTF-8?B?xYF1a2FzeiBGaWx1dA==?= User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Mario Weilguni CC: Andreas Hartmann , pgsql-performance@postgresql.org Subject: Re: Less rows -> better performance? References: <48846A02.7090702@apache.org> <48846DA3.2090308@archonet.com> <4884722A.1000405@apache.org> <1d4e0c10807210432v45c6272awb1ea13974747de54@mail.gmail.com> <4884A0F6.2000501@apache.org> <4884A4A7.7050503@sime.com> <4884A7D3.7050501@apache.org> <4884AB4A.2020709@sime.com> In-Reply-To: <4884AB4A.2020709@sime.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/202 X-Sequence-Number: 30802 [...] > You can check this too: > select relname, relpages, reltuples, relkind > from pg_class > where relkind in ('r', 'i') > order by relpages desc limit 20; > > Will give you the top-20 tables and their sizes, 1 page is typically > 8KB, so you can cross-check if relpages/reltuples is completly off, > this is a good indicator for table/index bloat. use this query : select pg_size_pretty(pg_relation_size(oid)) as relation_size,relname, relpages, reltuples, relkind from pg_class where relkind in ('r', 'i') order by relpages desc limit 20; output will be much more readeable > > Regards, > Mario Lukasz -- Lukasz Filut DBA - IT Group, WSB-TEB Corporation Poznan - Poland