Postgres cursor taking 2 hrs to update the table

From: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Postgres cursor taking 2 hrs to update the table
Date: 2019-12-24 10:32:10
Message-ID: VI1PR0701MB27185EBD51AE968A142CF594AE290@VI1PR0701MB2718.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Regards
Tarkeshwar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2019-12-24 13:12:10 Re: logical replication protocol
Previous Message Thomas Kellerer 2019-12-24 08:07:00 Re: Date created for tables