Skip site navigation (1) Skip section navigation (2)

Re: Prepared statements considered harmful

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements considered harmful
Date: 2006-08-31 13:19:22
Message-ID: 200608311519.23296.peter_e@gmx.net (view raw or flat)
Thread:
Lists: 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/

In response to

Responses

pgsql-hackers by date

Next:From: Zeugswetter Andreas DCP SDDate: 2006-08-31 13:24:47
Subject: Re: Prepared statements considered harmful
Previous:From: Andreas PflugDate: 2006-08-31 13:18:01
Subject: Re: Prepared statements considered harmful

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group