| From: | Dan Sugalski <dan(at)sidhe(dot)org> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | explain with placeholders? |
| Date: | 2004-09-07 14:19:52 |
| Message-ID: | a06110408bd6370b91252@[10.0.1.2] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Is there any way to convince explain to go do its thing when given a
query with placeholders in it?
I'm trying to do some performance checking of some of the queries
built into a system I'm building. The SQL's all done with
placeholders, for safety and ease of twiddling, but EXPLAIN...
EXPLAIN doesn't like them. Trying throws an "ERROR: there is no
parameter $1" which is somewhat sub-optimal.
Any way, short of hand-replacing the placeholders with real values
(which makes me nervous since the optimizer may do things that
wouldn't be doable in the system when it was running), to get a
meaningful check on these things?
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan(at)sidhe(dot)org have teddy bears and even
teddy bears get drunk
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2004-09-07 14:27:09 | Re: error: insert has more expressions than target column |
| Previous Message | Tom Lane | 2004-09-07 14:19:39 | Re: Salt in encrypted password in pg_shadow |