Re: How can one see what queries are running withing a

Поиск
Список
Период
Сортировка
Искать
От
Roger Ging
Тема
Re: How can one see what queries are running withing a
Дата
Msg-id
40DC83F9.3030801@musicreports.com
Ответ на
Список
Дерево обсуждения
How can one see what queries are running withing a postgres instance? "P.A.M. van Dam" <pam@pmg.xs4all.nl>
Re: How can one see what queries are running withing a postgres instance? Hervé Piedvache <footcow@noos.fr>
Re: How can one see what queries are running withing a postgres instance? Hervé Piedvache <footcow@noos.fr>
Re: How can one see what queries are running withing a Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: How can one see what queries are running withing a "P.A.M. van Dam " <pam@ramoth.xs4all.nl>
Re: How can one see what queries are running withing a Tom Lane <tgl@sss.pgh.pa.us>
Re: How can one see what queries are running withing a Roger Ging <roger@musicreports.com>


P.A.M. van Dam wrote:

>Hi!
>
>I'd like to know if there is a way to see what queries are running
>within a certain postgres instance and how much resources (cpu/memory)
>etc. they are using. Right now it's impossible to see what is happening
>within postgres when it's binaries are using 100% CPU.
>
>In Sybase there is a command which let's you view what 'processes' are
>running within the server and how much cpu (according to Sybase) they
>are using. It also provides you with a stored procedure to kill off some
>bad behaving queries. How can one do this within postgres?
>
>Thanks in advance!
>
>Best regards,
>
>	Pascal
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>  
>
select * from pg_stat_activity.  If you want to see the command that was 
run, you will need to turn on stats_command_string = true in 
postgresql.conf and re-start server.  PID shows up, so you can kill bad 
queries from terminal and see CUP % in top

Roger Ging
V.P., Information Technology
Music Reports, Inc.

В списке pgsql-performance по дате отправления
От: Tom Lane
Дата:
От: Mischa Sandberg
Дата:
Сообщение: Re: Query performance
FAQ