Re: monitoring sql queries

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: monitoring sql queries
Дата
Msg-id 20111117163225.GA15646@depesz.com
обсуждение исходный текст
Ответ на monitoring sql queries  ("J.V." <jvsrvcs@gmail.com>)
Ответы Re: monitoring sql queries  ("Tomas Vondra" <tv@fuzzy.cz>)
Re: monitoring sql queries  ("J.V." <jvsrvcs@gmail.com>)
Список pgsql-general
On Thu, Nov 17, 2011 at 09:29:11AM -0700, J.V. wrote:
> I am in need of a tool or method to see each/every SQL query that
> hits the PostgreSQL database.  By query I mean the query in SQL
> syntax with all the parameters passed.
>
> What I want to do is:
>     1) see the query
>     2) Determine how long the query takes to execute
>     3) Possibly log both of the above to a log file
>
> Is there any tool internal to PostgreSQL that would allow me to do this?
>
> I cannot monitor it from the code that is actually connecting &
> sending the query.
>
> any help or pointers would be greatly appreciated.

just enable logging of queries.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: "J.V."
Дата:
Сообщение: monitoring sql queries
Следующее
От: "Tomas Vondra"
Дата:
Сообщение: Re: monitoring sql queries