Re: Under what circumstances does PreparedStatement use stored plans?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Robinson <jlrobins(at)socialserve(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Under what circumstances does PreparedStatement use stored plans?
Date: 2004-04-13 17:23:28
Message-ID: 24308.1081877008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message James Robinson 2004-04-13 18:36:30 Re: Under what circumstances does PreparedStatement use stored plans?
Previous Message James Robinson 2004-04-13 15:23:48 Re: Under what circumstances does PreparedStatement use stored plans?