Re: Under what circumstances does PreparedStatement use stored plans? - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Under what circumstances does PreparedStatement use stored plans?
Date
Msg-id 24308.1081877008@sss.pgh.pa.us
Whole thread Raw
In response to Re: Under what circumstances does PreparedStatement use stored plans?  (James Robinson <jlrobins@socialserve.com>)
Responses Re: Under what circumstances does PreparedStatement use stored plans?  (James Robinson <jlrobins@socialserve.com>)
List pgsql-jdbc
James Robinson <jlrobins@socialserve.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

pgsql-jdbc by date:

Previous
From: James Robinson
Date:
Subject: Re: Under what circumstances does PreparedStatement use stored plans?
Next
From: James Robinson
Date:
Subject: Re: Under what circumstances does PreparedStatement use stored plans?