Hi,

Maybe you need a PreparedStatement Cache
http://www.theserverside.com/tt/articles/article.tss?l=Prepared-Statments

If your client is using string concatenation to build the SQL statements,
then it would be good to advice them to use StringBuffer.
http://java.sun.com/developer/JDCTechTips/2002/tt0305.html

--
Brian Tan Seng
Yahoo! Messenger ID: btanseng
Registered Linux User # 361862
http://counter.li.org

On 3/26/07, Orlando Andico <[EMAIL PROTECTED]> wrote:

I have got a project where the client is using JBoss. Their data
access is rather slow. For every application they do the following:

1) grab a database connection from the connection pool
2) create a SQL statement and prepare that statement
3) execute the statement, fetch results, etc.
4) close the statement
5) return the connection to the pool

Basically step #2 is expensive. Is it possible using the JBoss
container model, to have a bunch of pre-PreparedStatements associated
with each DB connection? that way when the bean gets a connection from
the pool, it also gets a bunch of PreparedStatements already (one
PreparedStatement for each possible SQL query).

This allows to use the SQL query optimizer more efficiently.

Anybody know if this can be done? and if so, any pointers to implement
this?

Thanks.
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to