query is taking longer time after a while - Mailing list pgsql-general

From tomrevam
Subject query is taking longer time after a while
Date
Msg-id 25661219.post@talk.nabble.com
Whole thread Raw
Responses Re: query is taking longer time after a while  (Brian Modra <brian@zwartberg.com>)
Re: query is taking longer time after a while  (Andy Colson <andy@squeakycode.net>)
Re: query is taking longer time after a while  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
I have a table with 5 million rows. 10 inserts and deletes are performed on
this table every second.
The table has indexes on the columns I use to query it, and the query is
returning about a 1000 rows. Initially the query takes a very short time
(order of miliseconds), after a few hours it takes hundreds of miliseconds,
and after a few days it can take more than 10 seconds. When this happens it
also blocks all other operations on the database and I see very long times
for all of them.

I thought this may be caused by the indexes not remaining in the memory, but
I increased the shared_buffers to 0.5 GB and this didn't seem to help.
--
View this message in context: http://www.nabble.com/query-is-taking-longer-time-after-a-while-tp25661219p25661219.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Postgres User
Date:
Subject: Re: Using Insert - Default in a condition expression ??
Next
From: Brian Modra
Date:
Subject: Re: query is taking longer time after a while