Re: slow performance with cursor

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Ayub Khan <ayub(dot)hp(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: slow performance with cursor
Date: 2021-06-25 16:21:06
Message-ID: 20210625162106.GM29179@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Jun 25, 2021 at 07:09:31PM +0300, Ayub Khan wrote:
> I am using postgresql 12 and using cursors in a stored procedure,
> executing procedure which has cursor is slowing down the call. However if I
> do not use the cursor and just execute the queries using JDBC (Java client)
> it's fast.

Is the query slower, or is it slow to transfer tuples ?
I expect there would be a very high overhead if you read a large number of
tuples one at a time.

> Is there any setting which needs to be modified to improve the performance
> of cursors. Also facing slow response with reading blobs (images) from db.
> Not an ideal way for storing images in db but this is a legacy application
> and wanted to check if there a quick tweak which can improve the
> performance while reading blob data from db.

Is the slowness between the client-server or on the server side ?
Provide some details ?

--
Justin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ayub Khan 2021-06-25 16:37:53 Re: slow performance with cursor
Previous Message Ayub Khan 2021-06-25 16:09:31 slow performance with cursor