From: | aditya desai <admad123(at)gmail(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Pg_locks and pg_stat_activity |
Date: | 2020-12-04 08:34:12 |
Message-ID: | CAN0SRDFgm0SS3TStHxD7r41X8mtE-7r58Rx67xbGmaq4hRSc0g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi Justin,
Thanks for your response.
I suspect JDBC is using parameterized queries (postgres $1, $2, ..) and psql
isn't (unless you type "prepare p AS SELECT ..." and execute p(.., .., ..)"
Yes JDBC is using parameterized queries which get constructed dynamically
depending upon user privileges in the application.Does this cause any
issues?
I don't know what server version you have, so I don't know whether to
suggest
testing with plan_cache_mode=force_custom_plan
It's Postgres 11.5.
I will look into links you shared.
Regards,
AD.
On Fri, Dec 4, 2020 at 1:47 PM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> On Fri, Dec 04, 2020 at 01:31:14PM +0530, aditya desai wrote:
> > Hi Justin,
> > Many thanks for your response. Please see my response below.
> >
> > What do you mean by API ? If it's a different client, how does it
> connect ?
> > Queries are getting called from Web UI built in Microservices spring
> boot.
> > It connected to Database with JDBC driver. Developers have handled
> > connection pooling at the Application side.
> >
> > What db driver ?
> >
> > Driver is JDBC
>
> I suspect JDBC is using parameterized queries (postgres $1, $2, ..) and
> psql
> isn't (unless you type "prepare p AS SELECT ..." and execute p(.., .., ..)"
>
> You can search and find other people who reported similar issues.
>
> https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B50FB8D5E%40ntex2010i.host.magwien.gv.at
>
> https://www.postgresql.org/message-id/flat/20200504191201.GU28974%40telsasoft.com
>
> I don't know what server version you have, so I don't know whether to
> suggest
> testing with plan_cache_mode=force_custom_plan
>
> --
> Justin
>
From | Date | Subject | |
---|---|---|---|
Next Message | Riswana Rahman | 2020-12-04 10:45:27 | PostgeSQL JSONB Column with various type of data |
Previous Message | Justin Pryzby | 2020-12-04 08:17:54 | Re: Pg_locks and pg_stat_activity |