> Hi Joe,
>
[quoted text clipped - 3 lines]
> with different SQL, simultaneously, on the same unique connection (per
> thread of course) without closing any of these statement?
Yes, subject perhaps to DBMS limits. For instance, in Oracle an open
statement or result set requires a DBMS-side cursor, of which there is
a configurable limit allowed for a single connection. Some other DBMSes
have no such limit.
> 2-if so, for how long these statement are valid? as long as the
> connection is?
They are valid for as long as the connection is open, or as long as
the objects to which their query plan (prepared statements) remain
unaltered. A statement referring to a table or procedure which is
altered by another connection, typically become defunct and must be
closed and recreated. Some other DBMSes require special settings to
allow a statement to be valid across transactions....
> 3-what is the cost on serverside when one's program keeps let's say, 20
> (pooled) connection, each connection having, let's say, 30 (cached)
> [prepared]statements each (i.e. 600 [prepared]statement total)?
Some DBMSes will incur no special burden, and others may incur memory
costs.
Joe Weinstein at BEA
>>>Anybody ever run into any problems caching a statement along with a
>>>connection. Since I use one connection per thread and one statement
[quoted text clipped - 16 lines]
>>
>>Joe Weinstein at BEA