RE: CMP 2.0 vs BMP - Which performes better?

2002-04-05 Thread prasanth sb

Hi elephantwalker,
 A big thanks for the help. This is a great support from 
elephantwalker with quick replies.God bless.
thanks,
Prasanth.




>From: "The elephantwalker" <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: RE: CMP 2.0 vs BMP - Which performes better?
>Date: Fri, 5 Apr 2002 11:54:00 -0800
>
>See my earlier post on this thread. You can use custom finders with
>_extreme_ ease in Orion. I gave an example for Oracle (since Oracle does 
>not
>_have_ the sql LIMIT statement). For other databases, you could use a LIMIT
>statement in your custom finder.
>
>Regards,
>
>the elephantwalker
>www.elephantwalker.com
>
>
>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of prasanth sb
>Sent: Friday, April 05, 2002 7:20 AM
>To: Orion-Interest
>Subject: RE: CMP 2.0 vs BMP - Which performes better?
>
>
>Hi Jeff and other dear friends,
>  I had this doubt in my mind very earlier.
>When we load very large amount of data from the database, how it can be
>handled? If we use result sets and iterate, this is going to take a long
>time? How can we limit the number of records that is present
>in the memory at a time?
>
>thanks,
>Prasanth.
>
>
>
>
>
> >From: "Jeff Schnitzer" <[EMAIL PROTECTED]>
> >Reply-To: Orion-Interest <[EMAIL PROTECTED]>
> >To: Orion-Interest <[EMAIL PROTECTED]>
> >Subject: RE: CMP 2.0  vs BMP -  Which performes better?
> >Date: Thu, 4 Apr 2002 16:22:17 -0800
> >
> > > From: Curt Smith [mailto:[EMAIL PROTECTED]]
> > >
> > > > There are several constraints to BMP beans which make them almost
> >always
> > > > perform slower than CMP beans.  In particular, the inability to bulk
> > > > load beans from finder methods is a nearly fatal defect.
> > >
> > > I'd like to know more of the details?
> > >
> > > How does the container deal with the following finder in CMP
> > > differently than BMP?
> > >
> > > Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");
> >
> >Lets assume this produces 1000 results which you then iterate through.
> >
> >With BMP beans, this will require 1001 database queries.  First the
> >finder, then 1000 selects to load each bean.
> >
> >With CMP, it's actually rather ambiguous what will happen.  Last time I
> >checked, Orion will load all the beans into an ArrayList.  Yes, lots of
> >memory consumed, but a *lot* better than 1001 database hits.  Admittedly
> >a bigger problem with orders of magnitude more objects, but even with
> >BMP you're going to choke if the finder query returns a billion rows of
> >primary key data.
> >
> >Some containers (not Orion, I don't think) allow you to specify that
> >finders should lazy-load beans.  But this brings you back to BMP
> >performance.  Some containers allow you to define "field groups" to
> >minimize the amount of data brought back (especially useful if you store
> >blobs), but not Orion.
> >
> >Personally, I don't understand why containers don't implement
> >Collections backed by the ResultSet directly.  98% of the time, the
> >client just creates an iterator and walks the results.  If the client
> >does something that the ResultSet can't support, build the full
> >Collection.
> >
> >Jeff Schnitzer
> >[EMAIL PROTECTED]
> >
>
>
>_
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>
>




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com





RE: CMP 2.0 vs BMP - Which performes better?

2002-04-05 Thread The elephantwalker

See my earlier post on this thread. You can use custom finders with
_extreme_ ease in Orion. I gave an example for Oracle (since Oracle does not
_have_ the sql LIMIT statement). For other databases, you could use a LIMIT
statement in your custom finder.

Regards,

the elephantwalker
www.elephantwalker.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of prasanth sb
Sent: Friday, April 05, 2002 7:20 AM
To: Orion-Interest
Subject: RE: CMP 2.0 vs BMP - Which performes better?


Hi Jeff and other dear friends,
 I had this doubt in my mind very earlier.
When we load very large amount of data from the database, how it can be
handled? If we use result sets and iterate, this is going to take a long
time? How can we limit the number of records that is present
in the memory at a time?

thanks,
Prasanth.





>From: "Jeff Schnitzer" <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: RE: CMP 2.0  vs BMP -  Which performes better?
>Date: Thu, 4 Apr 2002 16:22:17 -0800
>
> > From: Curt Smith [mailto:[EMAIL PROTECTED]]
> >
> > > There are several constraints to BMP beans which make them almost
>always
> > > perform slower than CMP beans.  In particular, the inability to bulk
> > > load beans from finder methods is a nearly fatal defect.
> >
> > I'd like to know more of the details?
> >
> > How does the container deal with the following finder in CMP
> > differently than BMP?
> >
> > Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");
>
>Lets assume this produces 1000 results which you then iterate through.
>
>With BMP beans, this will require 1001 database queries.  First the
>finder, then 1000 selects to load each bean.
>
>With CMP, it's actually rather ambiguous what will happen.  Last time I
>checked, Orion will load all the beans into an ArrayList.  Yes, lots of
>memory consumed, but a *lot* better than 1001 database hits.  Admittedly
>a bigger problem with orders of magnitude more objects, but even with
>BMP you're going to choke if the finder query returns a billion rows of
>primary key data.
>
>Some containers (not Orion, I don't think) allow you to specify that
>finders should lazy-load beans.  But this brings you back to BMP
>performance.  Some containers allow you to define "field groups" to
>minimize the amount of data brought back (especially useful if you store
>blobs), but not Orion.
>
>Personally, I don't understand why containers don't implement
>Collections backed by the ResultSet directly.  98% of the time, the
>client just creates an iterator and walks the results.  If the client
>does something that the ResultSet can't support, build the full
>Collection.
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>


_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx







RE: CMP 2.0 vs BMP - Which performes better?

2002-04-05 Thread prasanth sb

Hi Jeff and other dear friends,
 I had this doubt in my mind very earlier.
When we load very large amount of data from the database, how it can be 
handled? If we use result sets and iterate, this is going to take a long 
time? How can we limit the number of records that is present
in the memory at a time?

thanks,
Prasanth.





>From: "Jeff Schnitzer" <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: RE: CMP 2.0  vs BMP -  Which performes better?
>Date: Thu, 4 Apr 2002 16:22:17 -0800
>
> > From: Curt Smith [mailto:[EMAIL PROTECTED]]
> >
> > > There are several constraints to BMP beans which make them almost
>always
> > > perform slower than CMP beans.  In particular, the inability to bulk
> > > load beans from finder methods is a nearly fatal defect.
> >
> > I'd like to know more of the details?
> >
> > How does the container deal with the following finder in CMP
> > differently than BMP?
> >
> > Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");
>
>Lets assume this produces 1000 results which you then iterate through.
>
>With BMP beans, this will require 1001 database queries.  First the
>finder, then 1000 selects to load each bean.
>
>With CMP, it's actually rather ambiguous what will happen.  Last time I
>checked, Orion will load all the beans into an ArrayList.  Yes, lots of
>memory consumed, but a *lot* better than 1001 database hits.  Admittedly
>a bigger problem with orders of magnitude more objects, but even with
>BMP you're going to choke if the finder query returns a billion rows of
>primary key data.
>
>Some containers (not Orion, I don't think) allow you to specify that
>finders should lazy-load beans.  But this brings you back to BMP
>performance.  Some containers allow you to define "field groups" to
>minimize the amount of data brought back (especially useful if you store
>blobs), but not Orion.
>
>Personally, I don't understand why containers don't implement
>Collections backed by the ResultSet directly.  98% of the time, the
>client just creates an iterator and walks the results.  If the client
>does something that the ResultSet can't support, build the full
>Collection.
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx





RE: CMP 2.0 vs BMP - Which performes better?

2002-04-04 Thread Jeff Schnitzer

> From: Curt Smith [mailto:[EMAIL PROTECTED]]
> 
> > There are several constraints to BMP beans which make them almost
always
> > perform slower than CMP beans.  In particular, the inability to bulk
> > load beans from finder methods is a nearly fatal defect.
> 
> I'd like to know more of the details?
> 
> How does the container deal with the following finder in CMP
> differently than BMP?
> 
> Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");

Lets assume this produces 1000 results which you then iterate through.

With BMP beans, this will require 1001 database queries.  First the
finder, then 1000 selects to load each bean.

With CMP, it's actually rather ambiguous what will happen.  Last time I
checked, Orion will load all the beans into an ArrayList.  Yes, lots of
memory consumed, but a *lot* better than 1001 database hits.  Admittedly
a bigger problem with orders of magnitude more objects, but even with
BMP you're going to choke if the finder query returns a billion rows of
primary key data.

Some containers (not Orion, I don't think) allow you to specify that
finders should lazy-load beans.  But this brings you back to BMP
performance.  Some containers allow you to define "field groups" to
minimize the amount of data brought back (especially useful if you store
blobs), but not Orion.

Personally, I don't understand why containers don't implement
Collections backed by the ResultSet directly.  98% of the time, the
client just creates an iterator and walks the results.  If the client
does something that the ResultSet can't support, build the full
Collection.

Jeff Schnitzer
[EMAIL PROTECTED]




Re: [orion-interest]RE: CMP 2.0 vs BMP - Which performes better?

2002-04-04 Thread Hani Suleiman

Some caveats for the approach below:

- DB specified, rownum is an Oracle thing
- select * will bite you in the ass if your table structure ever changes

There are actually approaches for doing a limit type finder, using a
poll/seek algorithm...

On 4/4/02 4:59 pm, "The elephantwalker" <[EMAIL PROTECTED]> wrote:

> Curt,
> 
> I don't know anybody that uses the vanilla findAll() in a cmp finder. In
> orion, it is _extremely_ easy to add a customer finder findAll that has a
> limit. Here is my findAll for Oracle(oracle doesn't have LIMIT):
> 
> 
> 
> somebean
> findAll
> 
> int
> int
> 
> 
> 
> 
> You could likewise use a stored procedure in the  for even
> greater speed.
> 
> With these finders, cmp _rocks_!
> 
> regards,
> 
> the elephantwalker
> www.elephantwalker.com
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Curt Smith
> Sent: Thursday, April 04, 2002 9:21 AM
> To: Orion-Interest
> Subject: Re: CMP 2.0 vs BMP - Which performes better?
> 
> 
> 
>> There are several constraints to BMP beans which make them almost always
>> perform slower than CMP beans.  In particular, the inability to bulk
>> load beans from finder methods is a nearly fatal defect.
> 
> 
> I'd like to know more of the details?
> 
> How does the container deal with the following finder in CMP
> differently than BMP?
> 
> Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");
> 
> Or what was the scenario you where refering to?
> 
> To me the finder returns a collection problem is but one of the
> damning EJB achilies heals, in that the spec left out setting
> the max row count to limit the find collection to.
> 
> How does CMP help the huge memory and CPU and JNDI hit that
> a boundless findAll() causes?
> 
> 
> Thanks, curt
> 
> 
> 
> 
> 
> 





RE: CMP 2.0 vs BMP - Which performes better?

2002-04-04 Thread The elephantwalker

Curt,

I don't know anybody that uses the vanilla findAll() in a cmp finder. In
orion, it is _extremely_ easy to add a customer finder findAll that has a
limit. Here is my findAll for Oracle(oracle doesn't have LIMIT):



somebean
findAll

int
int




You could likewise use a stored procedure in the  for even
greater speed.

With these finders, cmp _rocks_!

regards,

the elephantwalker
www.elephantwalker.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Curt Smith
Sent: Thursday, April 04, 2002 9:21 AM
To: Orion-Interest
Subject: Re: CMP 2.0 vs BMP - Which performes better?



> There are several constraints to BMP beans which make them almost always
> perform slower than CMP beans.  In particular, the inability to bulk
> load beans from finder methods is a nearly fatal defect.


I'd like to know more of the details?

How does the container deal with the following finder in CMP
differently than BMP?

Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");

Or what was the scenario you where refering to?

To me the finder returns a collection problem is but one of the
damning EJB achilies heals, in that the spec left out setting
the max row count to limit the find collection to.

How does CMP help the huge memory and CPU and JNDI hit that
a boundless findAll() causes?


Thanks, curt









Re: CMP 2.0 vs BMP - Which performes better?

2002-04-04 Thread Curt Smith


> There are several constraints to BMP beans which make them almost always
> perform slower than CMP beans.  In particular, the inability to bulk
> load beans from finder methods is a nearly fatal defect.


I'd like to know more of the details?

How does the container deal with the following finder in CMP
differently than BMP?

Collection remoteRefs = home.findSalaryGreaterThan ( "50,000");

Or what was the scenario you where refering to?

To me the finder returns a collection problem is but one of the
damning EJB achilies heals, in that the spec left out setting
the max row count to limit the find collection to.

How does CMP help the huge memory and CPU and JNDI hit that
a boundless findAll() causes?


Thanks, curt








RE: CMP 2.0 vs BMP - Which performes better?

2002-04-03 Thread Jeff Schnitzer

Huh?

There are several constraints to BMP beans which make them almost always
perform slower than CMP beans.  In particular, the inability to bulk
load beans from finder methods is a nearly fatal defect.

In general, I recommend a combination of CMP entities and raw JDBC in
session beans for queries that are not efficient or possible in a CMP
environment.

Just watch out for relationships in Orion.  They are horribly broken,
have been for years, and don't show any sign of getting better.

Jeff Schnitzer
[EMAIL PROTECTED]

> -Original Message-
> From: Andrew Chau [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 29, 2002 6:11 PM
> To: Orion-Interest
> Subject: RE: CMP 2.0 vs BMP - Which performes better?
> 
> If performance is the only factor, BMP performs a million times faster
> than CMP. Well, may be not that much faster, but you get the point.
> 
> CMP is for ease of development, basically the container does all the
> work for you, but it is not as flexible and you cannot fine tune the
> query like you can do in BMP.
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Orion
> Newsgroup
> Sent: Thursday, March 28, 2002 2:40 PM
> To: Orion-Interest
> Subject: CMP 2.0 vs BMP - Which performes better?
> 
> Subject: CMP 2.0 vs BMP - Which performes better?
> From: "alt.cybercafes" <[EMAIL PROTECTED]>
>  ===
> I am in the process of building a database intensive app and wanted to
> know
> whether to use container manage persistance versus bean manage
> persistence
> for this database instensive application. What are the pros and cons
of
> CMP
> and BMP.?
> 
> thanks
> 
> 
> 
> 
> 





RE: CMP 2.0 vs BMP - Which performes better?

2002-03-29 Thread Andrew Chau

If performance is the only factor, BMP performs a million times faster
than CMP. Well, may be not that much faster, but you get the point.

CMP is for ease of development, basically the container does all the
work for you, but it is not as flexible and you cannot fine tune the
query like you can do in BMP.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Orion
Newsgroup
Sent: Thursday, March 28, 2002 2:40 PM
To: Orion-Interest
Subject: CMP 2.0 vs BMP - Which performes better?

Subject: CMP 2.0 vs BMP - Which performes better?
From: "alt.cybercafes" <[EMAIL PROTECTED]>
 ===
I am in the process of building a database intensive app and wanted to
know
whether to use container manage persistance versus bean manage
persistence
for this database instensive application. What are the pros and cons of
CMP
and BMP.?

thanks