From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "postgres hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: new vacuum is slower for small tables |
Date: | 2008-12-08 18:44:39 |
Message-ID: | 162867790812081044s5f32c005kd70b43933c25e41@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
It's strange, when I repeat tests, I get usually times about 10 ms,
but cca cca every 5 test it is about 2ms
postgres=# VACUUM x;
VACUUM
Time: 12,093 ms
postgres=# VACUUM x;
VACUUM
Time: 1,928 ms
postgres=# VACUUM x;
VACUUM
Time: 10,743 ms
postgres=# VACUUM x;
VACUUM
Time: 1,927 ms
postgres=# VACUUM x;
VACUUM
Time: 14,248 ms
postgres=# VACUUM x;
VACUUM
Time: 14,677 ms
postgres=# VACUUM x;
VACUUM
Time: 1,871 ms
postgres=# VACUUM x;
VACUUM
Time: 10,417 ms
postgres=# VACUUM x;
VACUUM
Time: 11,786 ms
postgres=# VACUUM x;
VACUUM
Time: 24,204 ms
postgres=# VACUUM x;
VACUUM
Time: 11,112 ms
postgres=# VACUUM x;
VACUUM
Time: 14,577 ms
postgres=# VACUUM x;
VACUUM
Time: 14,671 ms
postgres=# VACUUM x;
VACUUM
Time: 11,544 ms
postgres=# VACUUM x;
VACUUM
Time: 13,267 ms
postgres=# VACUUM x;
VACUUM
Time: 13,768 ms
postgres=# VACUUM x;
VACUUM
Time: 1,831 ms
Regards
Pavel Stehule
2008/12/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2008/12/8 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
>>> How did you measure that?
>
>> it's simple test
>
>> create table x(a integer, b integer);
>> insert into x select i, i from generate_series(1,1000) g(i);
>
>> and then vacuum on 8.3.5 and vacuum on current CVS HEAD.
>
> Hmm. There is something else going on here besides the pg_proc scan.
> Even after patching that, the elapsed time for a small-table VACUUM is
> typically much longer than in 8.3. But what's really interesting is
> that if you repeat it multiple times in quick succession, HEAD's time
> jumps all over the place whereas 8.3 is relatively stable:
>
> regression=# vacuum x;
> VACUUM
> Time: 61.809 ms
> regression=# vacuum x;
> VACUUM
> Time: 10.743 ms
> regression=# vacuum x;
> VACUUM
> Time: 40.615 ms
> regression=# vacuum x;
> VACUUM
> Time: 10.015 ms
> regression=# vacuum x;
> VACUUM
> Time: 53.364 ms
> regression=# vacuum x;
> VACUUM
> Time: 9.324 ms
> regression=# vacuum x;
> VACUUM
> Time: 43.339 ms
> regression=# vacuum x;
> VACUUM
> Time: 9.336 ms
> regression=# vacuum x;
> VACUUM
> Time: 53.271 ms
>
> 8.3's time is consistently between 9 and 12 msec on same box and
> same data. Anyone have an idea what's causing this?
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2008-12-08 18:50:35 | Re: Quick patch: Display sequence owner |
Previous Message | KaiGai Kohei | 2008-12-08 18:33:17 | Re: Updates of SE-PostgreSQL 8.4devel patches (r1268) |