| From: | Michael Holt <MHolt(at)terapeak(dot)com> |
|---|---|
| To: | Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>, Dan Ng <surfnet(at)yahoo(dot)com> |
| Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Getting |
| Date: | 2013-01-24 05:55:21 |
| Message-ID: | E7907DC29186A94988A077445AFD1DC02514D9AA@EXCHANGEVIC.ad.terapeak.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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
________________________________
From: pgsql-admin-owner(at)postgresql(dot)org [pgsql-admin-owner(at)postgresql(dot)org] on behalf of Raghavendra [raghavendra(dot)rao(at)enterprisedb(dot)com]
Sent: Wednesday, January 23, 2013 9:52 PM
To: Dan Ng
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Getting
On Wed, Jan 23, 2013 at 11:50 PM, Dan Ng <surfnet(at)yahoo(dot)com<mailto:surfnet(at)yahoo(dot)com>> wrote:
Hello,
I am a newb in Postgres coming from Oracle. Does anyone know if it's possible to see the plan being executed by Postgres for an active sql statement (from pg_stat_activity). This is to be able to troubleshoot poor performing ones and in Oracle we are able to retrieve such a plan.
Additionally, how do I see the actual sql statement that shows as "<unnamed portal x>".
Thanks so much for any advice you all may have.
-Dan
Welcome...!!!
You need to use additional module to write query plan in logs i.e., AUTO_EXPLAIN.
http://www.postgresql.org/docs/9.2/static/auto-explain.html
---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bert | 2013-01-24 06:26:55 | Re: vacuum / analyze parent tables on partitioned tables. |
| Previous Message | Raghavendra | 2013-01-24 05:52:28 | Re: Getting |