public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adrian Klaver <[email protected]>
To: KK CHN <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Resource Usage same In spite of fronting my DB server with Pgbouncer ?
Date: Fri, 23 Jan 2026 15:11:19 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKgGyB8JRMO3uKGYpmHXSuWE-xgt8OQiztSJP7tNwzd4u8L2Eg@mail.gmail.com>
References: <CAKgGyB9z_dN_5vOGS34CNMrT74F4OQWBToCHoSjsWShVDOGZyQ@mail.gmail.com>
<[email protected]>
<CAKgGyB8JRMO3uKGYpmHXSuWE-xgt8OQiztSJP7tNwzd4u8L2Eg@mail.gmail.com>
On 1/23/26 11:47 AM, KK CHN wrote:
> You mean to say the SQL statements are making this issue ? I also
> suspected wrongly formed query statements making this much load on the
> DB server.
> I also suspect this, as the developers who write queries are not so
> expertised for writing optimized queries, needs to be addressed separately.
>
> How can I find out which query statements are making the DB server on
> its knees ? Any method to find the bad queries? what parameters/
> behaviours to be checked for finding those query statements which really
> makes the db server to its knees by the heavy lifting ? any hints
> most welcome, I can explore and fix those ones.
For log settings that deal with statements, take a look at:
https://www.postgresql.org/docs/16/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN
and
https://www.postgresql.org/docs/16/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT
There is also, for viewing statistics on current activity:
https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-STATS-VIEWS
For another view of statistics see the extension:
https://www.postgresql.org/docs/16/pgstatstatements.html
In particular:
https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW
Also for lock activity:
https://www.postgresql.org/docs/16/view-pg-locks.html
> Sorry I missed to mention it, this is an EDB 16 server. Eventhoug I
> prefer to use any piece of S/W that is FOSS community editions,
> sometimes it is demanded to manage these products too.
>
EDB has variations of what they offer, a more specific definition would
be helpful.
view thread (4+ messages)
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: Resource Usage same In spite of fronting my DB server with Pgbouncer ?
In-Reply-To: <[email protected]>
* 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