Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D6F9765019F for ; Mon, 21 Jul 2008 12:29:23 -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 12906-06-2 for ; Mon, 21 Jul 2008 12:29:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx.inode.at (mx06.lb01.inode.at [62.99.145.6]) by postgresql.org (Postfix) with ESMTP id 6A496650195 for ; Mon, 21 Jul 2008 12:29:18 -0300 (ADT) Received: from [85.124.56.44] (port=16054 helo=[10.192.17.33]) by smartmx-06.inode.at with esmtp (Exim 4.50) id 1KKxK9-0002hc-4c; Mon, 21 Jul 2008 17:29:17 +0200 Message-ID: <4884AB4A.2020709@sime.com> Date: Mon, 21 Jul 2008 17:29:14 +0200 From: Mario Weilguni User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Andreas Hartmann CC: 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> In-Reply-To: <4884A7D3.7050501@apache.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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/185 X-Sequence-Number: 30785 Andreas Hartmann schrieb: > Mario Weilguni schrieb: >> Andreas Hartmann schrieb: > > […] > >>> I just verified that the autovacuum property is enabled. > > […] > >> Did you have: >> stats_start_collector = on >> stats_block_level = on >> stats_row_level = on >> >> Otherwise autovacuum won't run IMO. > > Thanks for the hint! The section looks like this: > > stats_start_collector = on > #stats_command_string = off > #stats_block_level = off > stats_row_level = on > #stats_reset_on_server_start = off > > > I'll check the logs if the vacuum really runs - as soon as I find them :) > > -- Andreas You might want to use these entries in your config: redirect_stderr = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' log_rotation_age = 1d Fit those to your needs, then you will find log entries in $PGDATA/pg_log/ And BTW, I was wrong, you just need to have stats_row_level=On, stats_block_level doesn't matter. But in fact it's simple, if you don't have 24x7 requirements type VACUUM FULL ANALYZE; and check if your DB becomes smaller, I really doubt you can have that much indizes that 27MB dumps might use 2.3 GB on-disk. 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. Regards, Mario