Re: Serious issues with CPU usage - Mailing list pgsql-performance

From Manfred Koizar
Subject Re: Serious issues with CPU usage
Date
Msg-id g8qolvoau4dabgqprbn1abde81f61eol5l@email.aon.at
Whole thread Raw
In response to Re: Serious issues with CPU usage  (Andri Saar <andris@estpak.ee>)
List pgsql-performance
On Mon, 8 Sep 2003 13:50:23 +0300, Andri Saar <andris@estpak.ee>
wrote:
>Basically I do this:
>1) select about ~700 ID's I have to poll
>2) poll them
>3) update those 700 rows in that "table" I used (~2700 rows total).
>
>And I do this cycle once per minute, so yes, I've got a zillion updates. 700
>of 2700 is roughly 25%, so I'd have to vacuum once per minute?

With such a small table VACUUM should be a matter of less than one
second:

fred=# vacuum verbose t;
INFO:  --Relation public.t--
INFO:  Index t_pkey: Pages 65; Tuples 16384: Deleted 4096.
        CPU 0.01s/0.10u sec elapsed 0.21 sec.
INFO:  Removed 4096 tuples in 154 pages.
        CPU 0.04s/0.02u sec elapsed 0.07 sec.
INFO:  Pages 192: Changed 192, Empty 0; Tup 16384: Vac 4096, Keep 0,
UnUsed 0.
        Total CPU 0.08s/0.16u sec elapsed 0.36 sec.
VACUUM
Time: 415.00 ms

And this is on a 400 MHz machine under cygwin, so don't worry if you
have a real computer.

Servus
 Manfred

pgsql-performance by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Serious issues with CPU usage
Next
From: Tom Lane
Date:
Subject: Re: Serious issues with CPU usage