From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)it> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: out of memory error |
Date: | 2010-08-06 15:43:31 |
Message-ID: | 1281109308-sup-669@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Excerpts from Silvio Brandani's message of vie ago 06 07:56:53 -0400 2010:
> it seems the execution plan is different for this query when run from
> the application versus the psql . How can I check the execution plan of
> a query run by a user??
> I can set explain analyze for the query via psql but how can I check
> with application running the query???
If this is a prepared query, then that is a good guess. You can see the
real plan that the application is getting in psql by explaining the
execution of a prepared statement like this:
PREPARE foo(int, text) AS SELECT blah FROM foo, bar WHERE foo.id = $1 AND ...
EXPLAIN ANALYZE EXECUTE foo(someval, another);
--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Burgholzer, Robert (DEQ) | 2010-08-06 18:28:12 | catalog corruption causes |
Previous Message | Alanoly Andrews | 2010-08-06 15:17:03 | Re: postgres 9.0 crash when bringing up hot standby |