Hi,

Milisic Aleksandar wrote:
Hi,

I was just wondering if somebody could tell me what
are the general techniques used when performing writes
and reads to optimize the performance (speed wise) of
OJB?
Or is anything said about it in the documentation (I
am having trouble finding it)?

You can find some hints here
http://db.apache.org/ojb/docu/guides/performance.html

Currently I rework the "performance.html" section. I will add more OJB performance test results compared with a JDBC layer and some more tips how to tune OJB.

Influence on performance has

- The autocommit setting of used connections. For best performance it's
recommended to set autocommit 'false' in the jdbc-driver or to use
'useAutoCommit="2"' setting in repository file database setting to avoid
Connection.setAutoCommit(...) calls by OJB.
- Use of batch statements by enable batch mode (when supported by the
DB) when insert/update/delete many objects of the same type (e.g. insert
ProductGroup with 20 Article objects). See jdbc-connection-descriptor
batch-mode attribute for more information.
- PersistentField class implementation. See OJB.properties section
'PersistentFieldClass' to change the implementation.
- The JDBC driver settings (e.g. statement caching on/off, autocommit mode).
- ConnectionFactory implementation / Connection pooling settings (e.g.
prepared statement caching if the jdbc-driver doesn't support this feature).




The reason I am asking is because I am doing some
profiling comparing OJB code with java sql and the OJB
code seems to be much slower for both reads and
writes, so I wanted to know how I can optimize it.

The upcoming OJB 1.0.5 release (scheduled for this month) will include some performance fixes (two read performance issues will be fixed), optimized code and fixed batch mode issues.

regards,
Armin



Thank you.


                
____________________________________________________ Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls http://au.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to