From: | Andy Colson <andy(at)squeakycode(dot)net> |
---|---|
To: | tomrevam <tomer(at)fabrix(dot)tv>, PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: query is taking longer time after a while |
Date: | 2009-09-29 14:07:26 |
Message-ID: | 4AC2149E.50807@squeakycode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
tomrevam wrote:
> 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.
Is one client connection making all the inserts/deletes?
Are you holding a transaction open for long periods of time?
Can you post an explain analyze'es'es for (1) when its quick and (2)
when its slow?
( what is the plural of explain analyze? :-) )
-Andy
From | Date | Subject | |
---|---|---|---|
Next Message | brent_despain | 2009-09-29 14:15:04 | Re: Using Insert - Default in a condition expression ?? |
Previous Message | Bill Moran | 2009-09-29 13:48:23 | Re: query is taking longer time after a while |