The save() method simply return without any database acces, so it basiccaly make a 1000 time loop. This is minimal if you compare it with the time it will take to save one car.
If you talk about 1M+ cars, it will probably mean around 1k of ram, so 1G overall just to load the object in memory, assuming your cars have only serial numbers and colors (ok, I talk about the real ram, not what is reported by the JVM, and I add the swap space that is not mentionned in Windows (tm) task manager by default). Your are probably not looking at the good framework or may want to ovelroad most of the methods like Scott mentionned. We tried 20 000 items, and the framwork goes nicely, of course, it take a small amount of time to save/retrieve all objects. But let's go back to the 1000 example, if you say the performance decrease, I would tend to believe your words. It may be because the objects ARE effectlvely modified. If it takes around 1s to save, that's because they are probably MODIFIED and effectively saved. Then look at your structure to see if you do things like copy the whole car list from one agent to the other (it save time and look obvious). That operation would change the primary key of the cars, making them modified since a car can only belong to one agent acording to what I remembered of the relations you mentionned before. Good luck Akmal Sarhan wrote: > > > thank you Scott for the answer, still the question is why does the > save() method iterate through "all" the old cars to save them,having > in mind that I add a new Car entry to an Agent that already exists i.e > I only update it by adding the new Car, and if this Agent already has, > say, 1M+ Cars, so I think you might get my point about the performance > issue. > > best regards > Akmal > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
