Re: Processing Delay

Lists: pgsql-general
From: "Michael Lawson (mshindo)" <michael(at)sphinix(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Processing Delay
Date: 2009-11-25 00:38:44
Message-ID: c97a47b90911241638v18b13a82s79d98ced4b873944@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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)


From: Christophe Pettus <xof(at)thebuild(dot)com>
To: "pgsql-general(at)postgresql(dot)org mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Processing Delay
Date: 2009-11-25 01:05:29
Message-ID: CA887F0D-4D50-4A2A-BF56-07FB93851AC9@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


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(at)thebuild(dot)com


From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "Michael Lawson (mshindo)" <michael(at)sphinix(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Processing Delay
Date: 2009-11-25 02:19:12
Message-ID: dcc563d10911241819g749104a7u72e34803381dd74a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, Nov 24, 2009 at 5:38 PM, Michael Lawson (mshindo)
<michael(at)sphinix(dot)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?


From: Sam Jas <samjas33(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, "Michael Lawson \(mshindo\)" <michael(at)sphinix(dot)com>
Subject: Re: Processing Delay
Date: 2009-11-25 05:30:25
Message-ID: 378873.65224.qm@web95014.mail.in2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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(at)sphinix(dot)com> wrote:

From: Michael Lawson (mshindo) <michael(at)sphinix(dot)com>
Subject: [GENERAL] Processing Delay
To: pgsql-general(at)postgresql(dot)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. http://in.yahoo.com/