Re: parameterized query much much slower than one with hard-coded string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Timbo Chen <timbo(at)powerreviews(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: parameterized query much much slower than one with hard-coded string
Date: 2011-11-10 15:10:23
Message-ID: 7810.1320937823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Timbo Chen <timbo(at)powerreviews(dot)com> writes:
> just wondering if there was a way to get the execution plan for the
> prepared statement.

Prepare an equivalently-parameterized statement by hand:

PREPARE foo(int,text,...) AS ...

and then do EXPLAIN [ANALYZE] EXECUTE foo(...)

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2011-11-10 15:19:32 Re: SSL patch
Previous Message Magosányi Árpád 2011-11-10 14:46:52 Re: SSL patch