You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Milisic Aleksandar <ac...@yahoo.com.au> on 2006/02/10 22:18:35 UTC

Speed issues

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)?


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.

Thank you.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Speed issues

Posted by ABOU LINA <am...@gmail.com>.
Hi,
About read performance you can use :
1. getIterator instead of getCollection
2. or use proxy solution
3. using the cach of ojb

another thing but i don't know how can we do it in OJB ; when OJB prepare a
statement (for read) by default he make SELECT * FROM ... so i think if we
have
a posibility to specify only fields that's we need instead of (*) we got a
good result at performance level in reading.





On 2/10/06, Milisic Aleksandar <ac...@yahoo.com.au> 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)?
>
>
> 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.
>
> Thank you.
>
>
>
> ____________________________________________________
> Do you Yahoo!?
> Messenger 7.0: Free worldwide PC to PC calls
> http://au.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Speed issues

Posted by Armin Waibel <ar...@apache.org>.
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: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org