Re: Getting

Поиск
Список
Период
Сортировка
От Dan Ng
Тема Re: Getting
Дата
Msg-id 1359046624.26078.YahooMailNeo@web120904.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: Getting  (Greg Williamson <gwilliamson39@yahoo.com>)
Список pgsql-admin
Hi,
The problem is the current_query (in pg_stat_activity) contains bind variables and I can't just take it to do the explain (and, of course I don't know the values of the bind variables).
 
On a related issue, how can I see the actual sql statement when the current_query shows "<unnamed portal x>".
pg_cursors is only accessible within the same transaction and as a DBA we want to see that cursor of any active transactions.
Thanks,
-Dan

From: Greg Williamson <gwilliamson39@yahoo.com>
To:
Cc: "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>
Sent: Thursday, January 24, 2013 1:08 AM
Subject: Re: [ADMIN] Getting

Dan --

>________________________________
> From: Michael Holt <MHolt@terapeak.com>
>To: Raghavendra <raghavendra.rao@enterprisedb.com>; Dan Ng <surfnet@yahoo.com>
>Cc: "pgsql-admin@postgresql.org" <pgsql-admin@postgresql.org>
>Sent: Wednesday, January 23, 2013 9:55 PM
>Subject: Re: [ADMIN] Getting
>
>
>
>Of course you can also see what the query plan will be without having to run the query through a standard explain query:
>
>
>http://www.postgresql.org/docs/9.0/static/sql-explain.html
>
>
I am not familiar with the Oracle tools, but you should note that the "EXPLAIN ANALYZE" does actually do the transaction, so if you doing an update / insert / delete you may want to wrap it in an explicit transaction and then roll it back.

HTH,

Greg Williamson



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


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

Предыдущее
От: Greg Williamson
Дата:
Сообщение: Re: Getting
Следующее
От: Viktor
Дата:
Сообщение: Archiving