Thanx a lot Alexander....you helped me a lot!
I appreciate that!

Forget a small thing (sorry!): Closing a statement using the close() method
does not affect the cache, don't it.

cu

Chris

p.S. Thanx for your unbelievable fast answers. :-)

-----Urspr�ngliche Nachricht-----
Von: Schroeder, Alexander [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. November 2003 14:08
An: Christoph Weser; maxdb (E-Mail)
Betreff: RE: Question: JDBC, PreparedStatements


Yes. That's because the cached information depends on the session,
and cannot exist without it. 

Alexander Schr�der
SAP DB, SAP Labs Berlin 

> -----Original Message-----
> From: Christoph Weser [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 28, 2003 2:05 PM
> To: maxdb (E-Mail)
> Subject: AW: Question: JDBC, PreparedStatements
> 
> 
> Hello!
> 
> So that means, that in case of 'n' connections in a pool, I 
> have the first
> "caching benefit/cachehit" maybe after the (n+1) execution of a
> connection.preparedStatement("some sql") in worst case?
> 
> Is this right?
> 
> Chris
> 
> 
> -----Urspr�ngliche Nachricht-----
> Von: Schroeder, Alexander [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 28. November 2003 14:01
> An: Christoph Weser; maxdb (E-Mail)
> Betreff: RE: Question: JDBC, PreparedStatements
> 
> 
> Hello Christoph,
> 
> if you specify cache=all, information is cached *per connection*. 
> That means there is not necessarily a need for caching the 
> information by yourself. 
> 
> Alexander Schr�der
> SAP DB, SAP Labs Berlin 
> 
> > -----Original Message-----
> > From: Christoph Weser [mailto:[EMAIL PROTECTED]
> > Sent: Friday, November 28, 2003 1:53 PM
> > To: maxdb (E-Mail)
> > Subject: Question: JDBC, PrepparedStatements
> > 
> > 
> > Hello everyone!
> > 
> > I am using sapdb 7.4 and the newest jdbc driver. For 
> > connection, the URL
> > "jdbc:sapdb://localhost:7210/DatabaseName?cache=all" will be used.
> > 
> > While processing requests, the following fragment is quite 
> > often executed:
> > 
> > pStatement = connection.prepareStatement("Some sql command with ?");
> > pStatement.setString(1,"Test");
> > pStatement.executeUpdate();
> > pStatement.close();
> > 
> > The connection 'connection' is from a connection pool and the 
> > connection
> > will be given back to the pool after every single request.
> > (Every request is a stateless request for which a own instance of a
> > requesthandler will be generated. That's why every request 
> > the connection
> > will be given back.)
> > 
> > Am I right, that the connection.prepareStatement()-method 
> > will cause the
> > JDBC-driver to lookup in his own preparedStatement-Cache? 
> > Would it be better to implement a preparedStatement-Cache by my own?
> > What's best practice?
> > 
> > Thanx a lot for help to everyone!
> > 
> > Chris
> > 
> > -- 
> > MaxDB Discussion Mailing List
> > For list archives: http://lists.mysql.com/maxdb
> > To unsubscribe:    
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> -- 
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to