Re: CPU load

From: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
To: kiki(at)fesb(dot)hr
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: CPU load
Date: 2008-09-29 07:26:03
Message-ID: 7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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!

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2008-09-29 07:39:09 Re: CPU load
Previous Message kiki 2008-09-29 07:17:22 Re: CPU load