Re: Prepared statements considered harmful - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Prepared statements considered harmful
Date
Msg-id 200608311519.23296.peter_e@gmx.net
Whole thread Raw
In response to Re: Prepared statements considered harmful  (Csaba Nagy <nagy@ecircle-ag.com>)
Responses Re: Prepared statements considered harmful
Re: Prepared statements considered harmful
List pgsql-hackers
Am Donnerstag, 31. August 2006 14:52 schrieb Csaba Nagy:
> So for the like query case you could save 2 plans, one for the indexable
> case, one for the not indexable case. Then at runtime you choose the
> proper one based on the pattern value.

OK, why don't you work out an example.  Let's look at this query:

SELECT * FROM t1 WHERE a LIKE $1;

What two plans would you prepare?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Prepared statements considered harmful
Next
From: "Zeugswetter Andreas DCP SD"
Date:
Subject: Re: Prepared statements considered harmful