Re: pg_stat_activity

Поиск
Список
Период
Сортировка
От Ron
Тема Re: pg_stat_activity
Дата
Msg-id 9884a24a-c129-a1a9-1901-2a9c8987331e@gmail.com
обсуждение исходный текст
Ответ на Re: pg_stat_activity  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Ответы Re: pg_stat_activity  (Shreeyansh Dba <shreeyansh2014@gmail.com>)
Re: pg_stat_activity  (Rui DeSousa <rui.desousa@icloud.com>)
Список pgsql-admin
Thanks.

How, then, do I get only long-running SELECT statements?

I've tried this (since I don't want to inadvertently get other DML & DDL statements which might have "select" in a field name), but CTEs and queries that start with a comment slip by this filter.

FROM pg_stat_activity
WHERE state <> 'idle'
  AND SUBSTRING(UPPER(query) FROM 1 FOR 6) = 'SELECT';

Thanks

On 06/11/2018 08:47 AM, Shreeyansh Dba wrote:
Ron,

Yes, It can list the insert,delete and update statement as well..



On Mon, Jun 11, 2018 at 7:07 PM, Ron <ronljohnsonjr@gmail.com> wrote:
Hi,

Does pg_stat_activity only list SELECT statements, or does it also list INSERT, DELETE and UPDATE statements?


--
Angular momentum makes the world go 'round.

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

Предыдущее
От: Shreeyansh Dba
Дата:
Сообщение: Re: pg_stat_activity
Следующее
От: Don Seiler
Дата:
Сообщение: Re: pg_stat_activity