Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AEE1464FCD8 for ; Mon, 21 Jul 2008 10:54:02 -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 23703-04 for ; Mon, 21 Jul 2008 10:53:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.61.230.242]) by postgresql.org (Postfix) with ESMTP id F3F21650060 for ; Mon, 21 Jul 2008 10:53:57 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id F018B5C0EA; Mon, 21 Jul 2008 21:53:55 +0800 (WST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id CD34A1E0435; Mon, 21 Jul 2008 21:53:55 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IRzSme+IYORi; Mon, 21 Jul 2008 21:53:55 +0800 (WST) Received: from [192.168.44.95] (203.161.97.213.static.amnet.net.au [203.161.97.213]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTP id E38F11E0434; Mon, 21 Jul 2008 21:53:54 +0800 (WST) Message-ID: <488494F4.5070401@postnewspapers.com.au> Date: Mon, 21 Jul 2008 21:53:56 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Guillaume Smet 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> In-Reply-To: <1d4e0c10807210432v45c6272awb1ea13974747de54@mail.gmail.com> 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=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/179 X-Sequence-Number: 30779 Guillaume Smet wrote: > On Mon, Jul 21, 2008 at 1:25 PM, Andreas Hartmann wrote: >> SELECT pg_database.datname, >> pg_size_pretty(pg_database_size(pg_database.datname)) AS size >> FROM pg_database where pg_database.datname = 'vvz_live_1'; >> >> datname | size >> ---------------+--------- >> vvz_live_1 | 2565 MB >> >> I wonder why the actual size is so much bigger than the data-only dump - is >> this because of index data etc.? > > More probably because the database is totally bloated. Do you run > VACUUM regularly or did you set up autovacuum? You might also want to REINDEX and see if that improves things. My understanding is that if vacuum isn't run regularly, the indexes may end up a bit of a mess as well as the tables. -- Craig Ringer