Re: [OJB-developers] ERROR: Server configuration denies access to data source
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-02-27 07:11:51
|
hi christian, you can also have lazy loading relationships without having a proxy for each object in the relationship. simply use <proxyCollection>true</proxyCollection> in the CollectionDescriptor : <CollectionDescriptor id="1"> <orderby sort="asc">saldo</orderby> <cdfield.name>konti</cdfield.name> <items.class>brj.ojb.Konto</items.class> <inverse_fk_descriptor_ids>2</inverse_fk_descriptor_ids> <auto.retrieve>true</auto.retrieve> <auto.update>true</auto.update> <auto.delete>true</auto.delete> <proxyCollection>true</proxyCollection> <<<- one proxy for the whole collection </CollectionDescriptor> the whole relationship can be loaded with two sqls (a count and a select). it's also possible to combine both proxy approaches, but i think it does not make sense (you'll end with n + 2 queries). hth jakob ----- Original Message ----- From: "Christian Sell" <chr...@ne...> To: "ojb" <obj...@li...> Sent: Tuesday, February 26, 2002 7:58 PM Subject: Re: [OJB-developers] ERROR: Server configuration denies access to data source Hi, I have pounded on this before, but think its worth repeating - I think the 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 for 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üello" <ri...@ya...>; "ojb" <obj...@li...> Sent: Tuesday, February 26, 2002 6:56 PM Subject: Re: [OJB-developers] ERROR: Server configuration denies access to 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üello 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 the 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 of 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 only need to make the system respond FAST, and maybe OJB will be used for every 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üello" <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üello 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 interesting > 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 _______________________________________________ Objectbridge-developers mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |