Re: [OJB-developers] ERROR: Server configuration denies access to data source
Brought to you by:
thma
From: Christian S. <chr...@ne...> - 2002-02-26 19:00:49
|
Hi, I have pounded on this before, but think its worth repeating - I think th= e biggest performance risk with OJB is the way relationships are handled. Unless something has been changed since I last looked at this, OJB first loads the primary keys for the related objects, and then loads the data f= or the individual objects one at a time. For a relationship with, say, 100 target objects, that can result in 101 SQL statements (unless objects are already in the cache) being sent over the network. Yuck. And the proxy "feature" does not remedy this a bit. A JDBC programmer (and some other O/R framworks as well) will use just 1 statement and iterate the cursor. regards, Christian ----- Original Message ----- From: "Thomas Mahler" <tho...@ho...> To: "Ricardo Arg=FCello" <ri...@ya...>; "ojb" <obj...@li...> Sent: Tuesday, February 26, 2002 6:56 PM Subject: Re: [OJB-developers] ERROR: Server configuration denies access t= o data source Hi Ricardo, I don't think that OJB is slow in general. I have done several performance comparisons against other persistence layer and native JDBC. To argue with your boss you can do the following: Let the OJB performance testsuite (build.sh performance) run against your MySql DB. YOu will definitely see that a native JDBC solution is not much faster. (say 5 to 20 percent) Of course performance depends a lot on you set up the mapping. The usage of proxies is sometimes helpful. But it always depends on the special requirements of your application. I hope to get the proxies issues fixed by this week. For the time beeing you might send me your repository.xml and some of your poor performing code. I will have a look at it. I hope this will be quick enough! lots of greetings from Essen, Germany, Thomas Ricardo Arg=FCello wrote: > Hi Thomas, > > OJB is performing REALLY slow, and I'm begining to have some "problemas= " with my users... > > A simple insert or select takes way to much time. I don't think it is a database problem, since MySql is very fast (because of the fact it doesn'= t use transactions or referential integrity :-) > > I just wanted to know how long do you think it will take you to check t= he dynamic proxy issue. I believe that OJB + dynamic proxies will be the solution for my perfomance problem, but in the mean time, I'm stuck into = a very uncomfortable situation... My boss is asking me to justify the use o= f a persistance layer whatsoever! He thinks straight JDBC would have been a better solution... But there is no way I could have finished the project = on time, if it wasn't for OJB! Thanks Thomas, you have done a GREAT job. I o= nly need to make the system respond FAST, and maybe OJB will be used for ever= y project we work on, from now on... > > I hope to hear from you soon, > > Greetings from Quito, Ecuador. > > Ricardo Arguello > ri...@ya... > > > > ----- Original Message ----- > From: "Thomas Mahler" <tho...@ho...> > To: "Ricardo Arg=FCello" <ri...@ya...> > Cc: "Objectbridge (E-Mail)" <obj...@li...> > Sent: Friday, February 22, 2002 1:02 PM > Subject: Re: [OJB-developers] ERROR: Server configuration denies access= to data source > > > Hi Ricardo, > > Ricardo Arg=FCello wrote: > > >>Hello, >> >>Nope, it didn't work. >> > > > > Mmh... > > > >>I'm still getting the same Exception when trying to get an object which has a lot of relations with another objects. >> >>This is the Exception (again): >> >> > > <snip> > > I will have a complete code walkthrough to fix this issue. > For the time beeing you might consider disabling the use of proxies. > > Did you run the performance tests? Any results that could be interestin= g > for us? > Imho, OJB won't perform bad (even without proxies) for a large range of > scenearios. > > cu, > > thomas > > > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > > > > > _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |