Thread: Processing Delay

Processing Delay

From
"Michael Lawson (mshindo)"
Date:
Hi,

We have a problem with a relatively small database at the moment that is resulting in delays times between insertions and retrievals. An update is applied to a single entry in a table and almost straight after that the same record is read.

The problem we are encountering is a delay before we can read the updated value. This delay can be up to 15 seconds in some cases.

We are inserting and retrieving data using JDBC, and the database in its current state is relatively small. What can we do to tweak this and reduce the apparent update time.

Regards

--
Michael Lawson (mshindo)

Re: Processing Delay

From
Christophe Pettus
Date:
On Nov 24, 2009, at 4:38 PM, Michael Lawson (mshindo) wrote:
> The problem we are encountering is a delay before we can read the
> updated value. This delay can be up to 15 seconds in some cases.

Is the delay a block (that is, you insert the value, and then the
SELECT that should retrieve it takes up to 15 seconds to execute), or
are you still seeing the old value for 15 seconds after the INSERT?

If the former, how heavily loaded is the database server, and what
does an EXPLAIN ANALYZE say about the SELECT?

If the latter, is the SELECT in the same or a different client
connection?
--
-- Christophe Pettus
    xof@thebuild.com


Re: Processing Delay

From
Scott Marlowe
Date:
On Tue, Nov 24, 2009 at 5:38 PM, Michael Lawson (mshindo)
<michael@sphinix.com> wrote:
> Hi,
>
> We have a problem with a relatively small database at the moment that is
> resulting in delays times between insertions and retrievals. An update is
> applied to a single entry in a table and almost straight after that the same
> record is read.
>
> The problem we are encountering is a delay before we can read the updated
> value. This delay can be up to 15 seconds in some cases.

What pg version, what's your access patterns look like, and what
maintenance like vacuuming / autovacuuming are you doing / not doing?

Is this within the same connection, and it's taking 15 seconds for an
insert to return?

Re: Processing Delay

From
Sam Jas
Date:
I suspect the issue is with the memories.
Is it possible for you to send us the following details.

(1) size of database you are managing on cluster ?
(2) postgresql.conf file
(3) Total RAM/ SHMMAX
(4) query which is taking more time. 


--
Thanks
Sam Jas


--- On Wed, 25/11/09, Michael Lawson (mshindo) <michael@sphinix.com> wrote:

From: Michael Lawson (mshindo) <michael@sphinix.com>
Subject: [GENERAL] Processing Delay
To: pgsql-general@postgresql.org
Date: Wednesday, 25 November, 2009, 12:38 AM

Hi,

We have a problem with a relatively small database at the moment that is resulting in delays times between insertions and retrievals. An update is applied to a single entry in a table and almost straight after that the same record is read.

The problem we are encountering is a delay before we can read the updated value. This delay can be up to 15 seconds in some cases.

We are inserting and retrieving data using JDBC, and the database in its current state is relatively small. What can we do to tweak this and reduce the apparent update time.

Regards

--
Michael Lawson (mshindo)



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.