From: | Manfred Koizar <mkoi-pg(at)aon(dot)at> |
---|---|
To: | Andri Saar <andris(at)estpak(dot)ee> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)tm(dot)ee>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Serious issues with CPU usage |
Date: | 2003-09-08 11:53:02 |
Message-ID: | g8qolvoau4dabgqprbn1abde81f61eol5l@email.aon.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Mon, 8 Sep 2003 13:50:23 +0300, Andri Saar <andris(at)estpak(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-09-08 14:04:33 | Re: Serious issues with CPU usage |
Previous Message | Shridhar Daithankar | 2003-09-08 11:14:56 | Re: Serious issues with CPU usage |