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@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> 2008/12/8 Heikki Linnakangas <heikki.linnakangas@enterprisedb.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
>