public inbox for [email protected]
help / color / mirror / Atom feedFrom: Subramaniam C <[email protected]>
To: Julien Rouhaud <[email protected]>
Cc: [email protected]
Subject: Re: Slow query in JDBC
Date: Thu, 28 Sep 2017 14:28:24 +0530
Message-ID: <CAL=06Wme9NwYw9nDv034_DUJdzRxoDpK3r0v48-8fn-y=q+yyA@mail.gmail.com> (raw)
In-Reply-To: <CAOBaU_bDpYP-G0uA4Rbdv6DgToEGgkMvufftxxzAJWWcxoCKfg@mail.gmail.com>
References: <CAL=06W=f17ZnNQ8AdUKpd0p-6dfdwLios-Pvqkhqm7L8ziopjQ@mail.gmail.com>
<CAOBaU_bDpYP-G0uA4Rbdv6DgToEGgkMvufftxxzAJWWcxoCKfg@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
I configured cursor_tuple_fraction to 1 but still I am facing the same
issue.
Please help.
On Thu, Sep 28, 2017 at 2:18 PM, Julien Rouhaud <[email protected]> wrote:
> On Thu, Sep 28, 2017 at 10:19 AM, Subramaniam C
> <[email protected]> wrote:
> > Hi
> >
> > When I try to execute the query from sql command line then that query is
> > taking only around 1 sec. But when I execute the query using JDBC(Java)
> > using preparedStatement then the same query is taking around 10 secs.
> >
> > Can you please let us know the reason and how to fix this issue?
>
>
> I think jdbc always uses cursor, which can be problematic with default
> configuration, because postgres will try to generate plans that
> returns fast the first rows but not all the rows . Can you try to
> configure cursor_tuple_fraction to 1 and see if that fixes your issue?
>
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Slow query in JDBC
In-Reply-To: <CAL=06Wme9NwYw9nDv034_DUJdzRxoDpK3r0v48-8fn-y=q+yyA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox