From: Justin Pryzby <pryzby@telsasoft.com>
To: Ayub Khan <ayub.hp@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: slow performance with cursor
Date: Fri, 25 Jun 2021 11:21:06 -0500
Message-ID: <20210625162106.GM29179@telsasoft.com> (raw)
In-Reply-To: <CAHdeyE+0tG-TbUhfznXMu4cycK2U13zTa-qw-fZ7_PBQ_QW69g@mail.gmail.com>
References: <CAHdeyE+0tG-TbUhfznXMu4cycK2U13zTa-qw-fZ7_PBQ_QW69g@mail.gmail.com>
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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pryzby@telsasoft.com, ayub.hp@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: slow performance with cursor
In-Reply-To: <20210625162106.GM29179@telsasoft.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