Re: pg 8.3beta 2 restore db with autovacuum report

From: andy <andy(at)squeakycode(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg 8.3beta 2 restore db with autovacuum report
Date: 2007-11-03 01:46:08
Message-ID: 472BD2E0.9070202@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> andy wrote:
>> with autovacuum enabled with default settings, cramd.sql is 154M:
>>
>> andy(at)slacker:/pub/back$ time pg_restore -Fc -C -d postgres cramd.sql
>>
>> real 3m43.687s
>
> [...]
>
>> Now I dropdb and disable autovacuum, restart pg:
>>
>> andy(at)slacker:/pub/back$ time ( pg_restore -Fc -C -d postgres cramd.sql;
>> vacuumdb -z cramd )
>>
>> real 3m47.229s
>> user 0m9.933s
>> sys 0m0.744s
>>
>> Sweet, about the same amount of time.
>
> Thanks. I find it strange that it takes 3 minutes to restore a 150 MB
> database ... do you have many indexes?
>
> Even though the restore times are very similar, I find it a bit
> disturbing that the "CREATE INDEX" is shown to be waiting. Was it just
> bad luck that the ps output shows it that way, or does it really wait
> for long?
>

There are about 800 tables, each has one index. Most tables (75%) are
very small, the rest have, maybe 50K rows.

I had to run the ps several times to catch it waiting. It didnt seem to
wait too long.

It was run on my laptop, which may not have the best io times in the
world (and it only has 512 Meg ram).

-Andy

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-11-03 08:19:06 Re: beta2, I can't set UTF-8 for czech locales on win
Previous Message Guillaume Smet 2007-11-03 00:32:29 Re: pg 8.3beta 2 restore db with autovacuum report