Skip site navigation (1) Skip section navigation (2)

Re: Less rows -> better performance?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: Andreas Hartmann <andreas(at)apache(dot)org>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Less rows -> better performance?
Date: 2008-07-21 13:53:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Guillaume Smet wrote:
> On Mon, Jul 21, 2008 at 1:25 PM, Andreas Hartmann <andreas(at)apache(dot)org> 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

In response to

pgsql-performance by date

Next:From: Rusty ConoverDate: 2008-07-21 13:57:17
Subject: Re: Perl/DBI vs Native
Previous:From: Craig RingerDate: 2008-07-21 13:49:18
Subject: Re: Perl/DBI vs Native

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group