James Robinson <jlrobins(at)socialserve(dot)com> writes:
> Anyone know off the top of their heads any particular resource limits
> server-prepared queries cost? Should any attempt at this scheme take
> into account any particular upper-limit of prepared queries?
There's no hard upper limit. The cost is basically the backend memory
space needed to store the query parse and plan trees, which of course
depends quite a lot on the complexity of the query, but I'd think we'd
be talking a few kilobytes for typical queries. So you could probably
store order-of-100 prepared plans without thinking about it, even in a
system with a lot of active backends.
regards, tom lane