pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>
To: 'pgsql-general@postgresql.org' <pgsql-general@postgresql.org>
Subject: Re: Postgres cursor taking 2 hrs to update the table
Date: Tue, 24 Dec 2019 08:43:15 -0800
Message-ID: <b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.com> (raw)
In-Reply-To: <VI1PR0701MB27185EBD51AE968A142CF594AE290@VI1PR0701MB2718.eurprd07.prod.outlook.com>
References: <VI1PR0701MB27185EBD51AE968A142CF594AE290@VI1PR0701MB2718.eurprd07.prod.outlook.com>

On 12/24/19 2:32 AM, M Tarkeshwar Rao wrote:
> Hi,
> 
> I have the 10 application processes(each process having 12 threads and 
> each of have updating 8 million rows in the shared memory) which are 
> reading the data from single postgres database. We are using database 
> cursors in C++ to fetch the data and updating the shared memory. There 
> is the timer attached, where all the processor threads going to fetch 
> the data.
> 
> The issue is that sometimes it is fetching all the data in few seconds 
> and sometimes it is taking 2 hrs.
> 
> /What could be the issue. Can you please guide me to resolve the issue?/

By providing more information:

1) Postgres version?

2) OS and version?

3) Where the client and server are relative to each other?

4) Any relevant information from the Postgres log?

You might also look at:

https://www.postgresql.org/docs/11/auto-explain.html

> 
> Regards
> 
> Tarkeshwar
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (2+ messages)

Message-ID: <b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.com>
Permalink:  ../b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.com/
Also on:    postgresql.org/message-id/b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, m.tarkeshwar.rao@ericsson.com
  Subject: Re: Postgres cursor taking 2 hrs to update the table
  In-Reply-To: <b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.com>
  References: <VI1PR0701MB27185EBD51AE968A142CF594AE290@VI1PR0701MB2718.eurprd07.prod.outlook.com> <b58483d0-21fe-ac2a-3abd-024ccb1b4836@aklaver.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