Re: Postgresql monitoring question

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Georgy Zhukov <georgy_zhukov(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql monitoring question
Date: 2002-01-18 20:14:12
Message-ID: 200201182014.g0IKEC410835@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Georgy Zhukov wrote:
> I inherited a postgresql database which has queries run against it
> from perl scripts. I need to determine which query from the scripts
> is taking an extremely long time, but do not know how to monitor or
> identify queries as they are run against the database.
>
> I know little of postgresql, but quite a bit about SQL and databases
> in general.
>
> Are there tools I can use to monitor or log (*not* transaction log)
> what is going on inside the database. Once I can identify the query,
> I can go into the perl code (several thousand lines) and figure out
> the part I need to modify (assuming that I need to change the perl),
> or which tables/indexes to optimize.

ps will show processes, and pgmonitor shows queries too:

http://gborg.postgresql.org/project/pgmonitor

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roberto Andrade Fonseca 2002-01-18 20:25:59 PL/pgSQL examples?
Previous Message Doug McNaught 2002-01-18 20:09:31 Re: How to determine which are "idle in transaction"