Re: CPU load - Mailing list pgsql-performance

From Harald Armin Massa
Subject Re: CPU load
Date
Msg-id 7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com
Whole thread Raw
In response to Re: CPU load  (kiki@fesb.hr)
Responses Re: CPU load
List 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!

pgsql-performance by date:

Previous
From: kiki@fesb.hr
Date:
Subject: Re: CPU load
Next
From: "Albe Laurenz"
Date:
Subject: Re: CPU load