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: Thu, 1 Jul 2021 11:32:31 -0500
Message-ID: <20210701163231.GR21248@telsasoft.com> (raw)
In-Reply-To: <CAHdeyELrmZ+dVNuJhAERV7AucgZCGHTO8A_L5+g8CRTC4qZ2pQ@mail.gmail.com>
References: <CAHdeyE+0tG-TbUhfznXMu4cycK2U13zTa-qw-fZ7_PBQ_QW69g@mail.gmail.com>
<CAHdeyELrmZ+dVNuJhAERV7AucgZCGHTO8A_L5+g8CRTC4qZ2pQ@mail.gmail.com>
On Fri, 25 Jun 2021, 19:09 Ayub Khan, <ayub.hp@gmail.com> 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 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.
On Thu, Jul 01, 2021 at 07:29:31PM +0300, Ayub Khan wrote:
> I set the cursor_tuple_fraction to 1 now I am seeing high cpu for fetach
> all in
>
> The number of rows returned is less than 200. Why is the high cpu being
> shown for fetch all
It seems like you're asking for help, but need to show the stored procedure
you're asking for help with.
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: <20210701163231.GR21248@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