This content has been marked as final.
Show 1 reply
-
1. Re: Too many SQL SELECTs (I guess) in a CMP
dsundstrom Jun 25, 2002 11:55 PM (in response to carlos.grahl)I strongly suggest you buy a copy of the JBossCMP documentation before attempting to measure performance or tune an application. There is an entire chapter on Optimized Loading.
There are many things that can affect the performance of this code, but the most important are the transaction boundaries and commit options. These two determine when data must be reloaded from the database. What commit option are you using and what are the transaction bounds.
BTW, you can load all of the data in one query if you use read ahead on-find. Using finders in a tight loop is a very bad idea, because the ejb specification requires a full database synchronization before a finder is executed.