CMP will load in all the entities in one go (in orion at least).

There will be a performance difference between straight JDBC and EJB, since
there's more involved with an EJB query. Transactions, constructing entities
and so on are extra overhead that just getting a resultset back will not
have.

So if done right, CMP will be close in speed to straight JDBC, plus you have
the potential for more goodies like container caching of finders and
entities and so on, that you'd get for 'free' in some new version of your
favourite container, if it doesn't do so already!

On 6/4/02 7:15 pm, "Duffey, Kevin" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> Kinda curious about one thing. We use BMP, and tried CMP. Both seem to load
> one record at a time. With straight JDBC, you can query and get a large
> result set back in one time. When comparing our searching using CMP and BMP,
> it is over 100 times slower than a straight JDBC query when getting several
> 1000 records. Maybe we are doing something wrong, but can anyone tell me if
> this makes sense? Should CMP with EJB 2.0 (and lets use all aspects, such as
> the EJB QL language if necessary to do a query) be as fast as a straight
> JDBC call? Or is it in fact that doing a query with JDBC and getting the
> ResultSet back is much faster than a container that implements CMP? Id
> really like to use EJB 2.0 and CMP, but if the results are anything like
> what we are seeing, it seems to be way too slow for big tasks. We are
> re-evaluating if we should use EJB for our tasks or not.
> 
> Thanks.
> 


Reply via email to