Обсуждение: tools like innotop for PostgreSQL?
Hi all, we are using PostgreSQL in a docker container for a fhir server. Performance is not as desired/ as fast as other fhir servers currently in testing. For MySQL there are monitoring tools like mytop, innotop which show running SQL commands. Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning? Tried so far: pg_top only shows system processes. pgstats is to much vmstat-like dbeaver does not show running sql-commands to my knowledge select * from pg_stat_activity; kind regards, Anton
Hi Anton, try https://severalnines.com/database-blog/dynamic-monitoring-postgresql-instances-using-pgtop Regards, Holger Am 14.12.20 um 10:14 schrieb Dischner, Anton: > Hi all, > > we are using PostgreSQL in a docker container for a fhir server. > > Performance is not as desired/ as fast as other fhir servers currently in testing. > > For MySQL there are monitoring tools like mytop, innotop which show running SQL commands. > > Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning? > > Tried so far: > > pg_top only shows system processes. > > pgstats is to much vmstat-like > > dbeaver does not show running sql-commands to my knowledge > > select * from pg_stat_activity; > > kind regards, > > Anton > > > > -- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Вложения
Hi all,
we tested pg_top but missed:
Planner Information
E - Execution Plan
Entering E will provide a prompt for a process ID for which to show an explain plan. This is equivalent to running “EXPLAIN <QUERY>;” in the database manually.
A - EXPLAIN ANALYZE (UPDATE/DELETE safe)
Entering A will provide a prompt for a process ID for which to show an EXPLAIN ANALYZE plan. This is equivalent to running “EXPLAIN ANALYZE <QUERY>;” in the database manually.
Process Information
Q - Show current query of a process
Entering Q will provide a prompt for a process ID for which to show the full query.
I - Shows I/O statistics per process (Linux only)
Entering I switches the process list to an I/O display, showing each process reads, writes, etc to disk.
we will take a closer look into it,
thanks a lot for the link,
best,
Anton
Von: Holger Jakobs <holger@jakobs.com>
Gesendet: Montag, 14. Dezember 2020 10:15
An: pgsql-admin@lists.postgresql.org
Betreff: Re: tools like innotop for PostgreSQL?
Hi Anton,
try
https://severalnines.com/database-blog/dynamic-monitoring-postgresql-instances-using-pgtop
Regards,
Holger
Am 14.12.20 um 10:14 schrieb Dischner, Anton:
> Hi all,
>
> we are using PostgreSQL in a docker container for a fhir server.
>
> Performance is not as desired/ as fast as other fhir servers currently in testing.
>
> For MySQL there are monitoring tools like mytop, innotop which show running SQL commands.
>
> Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning?
>
> Tried so far:
>
> pg_top only shows system processes.
>
> pgstats is to much vmstat-like
>
> dbeaver does not show running sql-commands to my knowledge
>
> select * from pg_stat_activity;
>
> kind regards,
>
> Anton
>
>
>
>
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Hi again,
pgtop connected to a container does not show any postgres processes.
The example uses -r parameter.
Using this parameter leads to error: Stored function 'pg_cputime' is missing.
To resolve this we should add:
The pg_proctab extension needs to be loaded into the database you are connecting too. That can be installed from pgxn or source.
Source: https://github.com/markwkm/pg_top/issues/11
Question: Anybody did loading extensions to postgresql especially in a container, any hints?
best,
Anton
Von: Holger Jakobs <holger@jakobs.com>
Gesendet: Montag, 14. Dezember 2020 10:15
An: pgsql-admin@lists.postgresql.org
Betreff: Re: tools like innotop for PostgreSQL?
Hi Anton,
try
https://severalnines.com/database-blog/dynamic-monitoring-postgresql-instances-using-pgtop
Regards,
Holger
Am 14.12.20 um 10:14 schrieb Dischner, Anton:
> Hi all,
>
> we are using PostgreSQL in a docker container for a fhir server.
>
> Performance is not as desired/ as fast as other fhir servers currently in testing.
>
> For MySQL there are monitoring tools like mytop, innotop which show running SQL commands.
>
> Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning?
>
> Tried so far:
>
> pg_top only shows system processes.
>
> pgstats is to much vmstat-like
>
> dbeaver does not show running sql-commands to my knowledge
>
> select * from pg_stat_activity;
>
> kind regards,
>
> Anton
>
>
>
>
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Hi again,
pgtop connected to a container does not show any postgres processes.
The example uses -r parameter.
Using this parameter leads to error: Stored function 'pg_cputime' is missing.
To resolve this we should add:
The pg_proctab extension needs to be loaded into the database you are connecting too. That can be installed from pgxn or source.
Source: https://github.com/markwkm/pg_top/issues/11
Question: Anybody did loading extensions to postgresql especially in a container, any hints?
best,
Anton
Von: Holger Jakobs <holger@jakobs.com>
Gesendet: Montag, 14. Dezember 2020 10:15
An: pgsql-admin@lists.postgresql.org
Betreff: Re: tools like innotop for PostgreSQL?
Hi Anton,
try
https://severalnines.com/database-blog/dynamic-monitoring-postgresql-instances-using-pgtopRegards,
Holger
Am 14.12.20 um 10:14 schrieb Dischner, Anton:
> Hi all,
>
> we are using PostgreSQL in a docker container for a fhir server.
>
> Performance is not as desired/ as fast as other fhir servers currently in testing.
>
> For MySQL there are monitoring tools like mytop, innotop which show running SQL commands.
>
> Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning?
>
> Tried so far:
>
> pg_top only shows system processes.
>
> pgstats is to much vmstat-like
>
> dbeaver does not show running sql-commands to my knowledge
>
> select * from pg_stat_activity;
>
> kind regards,
>
> Anton
>
>
>
>
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
> On Dec 14, 2020, at 2:14 AM, Dischner, Anton <Anton.Dischner@med.uni-muenchen.de> wrote: > > Hi all, > > we are using PostgreSQL in a docker container for a fhir server. > > Performance is not as desired/ as fast as other fhir servers currently in testing. > > For MySQL there are monitoring tools like mytop, innotop which show running SQL commands. > > Are there any equivalent tools for PostgreSQL to find SQL commands which deserve tuning? > ... We use pg_stat_statements
On 12/14/2020 at 1:12 PM, "Scott Ribe" <scott_ribe@elevated-dev.com> wrote: > >> On Dec 14, 2020, at 2:14 AM, Dischner, Anton ><Anton.Dischner@med.uni-muenchen.de> wrote: >> >> Hi all, >> >> we are using PostgreSQL in a docker container for a fhir server. >> >> Performance is not as desired/ as fast as other fhir servers >currently in testing. >> >> For MySQL there are monitoring tools like mytop, innotop which >show running SQL commands. >> >> Are there any equivalent tools for PostgreSQL to find SQL >commands which deserve tuning? >> ... > >We use pg_stat_statements Hi Anton for monitoring running SQL check out pg_activity at https://github.com/dalibo/pg_activity , from the OPM guys Dalibo. cheers Peter Goodwin