Re: CPU load

Поиск
Список
Период
Сортировка
От kiki@fesb.hr
Тема Re: CPU load
Дата
Msg-id 50519.161.53.168.65.1222677569.squirrel@www.fesb.hr
обсуждение исходный текст
Ответ на Re: CPU load  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
Ответы Re: CPU load  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-performance
Hello Herald,

the queried table is used for communication between server application and
web user interface.
When application detects an event it writes it down in table.
The web client checks every 10 second if something new is written in the
table.
Usually nothing new is written but the client has to check it.
I don't fetch all rows, usually just the last one written.
The speed of the query is not a problem but the strange thing is the
processor load with postmaster when the query is executed.
I don’t now how to reduce processor load.
Should I change some other settings beside shared_buffers like work_mem?
Or maybe such processor load is OK?

Regards,
Maja

> Hello Maja,
>
>> EXPLAIN ANALYSE  SELECT * FROM system_alarm WHERE id_camera='3' AND
>> confirmed='false' AND dismissed='false' ORDER BY date DESC, time DESC
>> LIMIT 1;
>>
>> (the table is indexed by id_camera, has around 1 milion rows, and this
>> query returns around 700000 rows and is executed (EXPLAIN ANALYSE) in
>> around 4800 ms, and this table is queried a lot although not so often
>> queried modified)
>
> 700.000 of 1.000.000 rows is around 70% ... that are nearly all rows.
> As much as I read you, this table is not often modified. What reason
> is there for quering all that data again and again instead of keeping
> it in memory (should it be really needed) ?
>
>
> Harald
>
> --
> GHUM Harald Massa
> persuadere et programmare
> Harald Armin Massa
> Spielberger Straße 49
> 70435 Stuttgart
> 0173/9409607
> no fx, no carrier pigeon
> -
> EuroPython 2009 will take place in Birmingham - Stay tuned!
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>



В списке pgsql-performance по дате отправления:

Предыдущее
От: kiki@fesb.hr
Дата:
Сообщение: Re: CPU load
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: CPU load