pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Harald Armin Massa <haraldarminmassa@gmail.com>
To: kiki@fesb.hr
Cc: pgsql-performance@postgresql.org
Subject: Re: CPU load
Date: Mon, 29 Sep 2008 09:26:03 +0200
Message-ID: <7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com> (raw )
In-Reply-To: <49550.161.53.168.65.1222672642.squirrel@www.fesb.hr >
References: <50724.193.198.80.76.1222370001.squirrel@www.fesb.hr >
<dcc563d10809251300i7e8dd8aej12d08a4082671bbf@mail.gmail.com >
<D960CB61B694CF459DCFB4B0128514C2028AA976@exadv11.host.magwien.gv.at >
<49663.161.53.168.65.1222428487.squirrel@www.fesb.hr >
<D960CB61B694CF459DCFB4B0128514C2028AABB1@exadv11.host.magwien.gv.at >
<a1ec7d000809260801q17238d58wa6e4731e3a1d795b@mail.gmail.com >
<49550.161.53.168.65.1222672642.squirrel@www.fesb.hr >
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!
view thread (16+ messages) latest in thread
Message-ID: <7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com>
Permalink: ../7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com/
Also on: postgresql.org/message-id/7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: haraldarminmassa@gmail.com, kiki@fesb.hr
Subject: Re: CPU load
In-Reply-To: <7be3f35d0809290026o43e7879fu760d1ddbc360b177@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox