Bugs item #686577, was opened at 2003-02-14 14:43 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428708&aid=686577&group_id=40712
Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Markus Menner (morphace) Assigned to: Nobody/Anonymous (nobody) Summary: low performance loading with optional 1-1 association Initial Comment: I use Hibernate 1.2.3. There is a problem, which causes a severe performance loss: If you have 2 entites (A and B) with a 1-1 association, Hibernate uses an SQL query with a join (if enabled) to load both entites with 1 statement. Wonderful! If there is a B for an A, everything is okay. If there is no B for a certain A, Hibernate tries (although the 1st statment returned no instance for B) to load B, when you invoke the corresponding getter, which results in an unnecessary SQL query! If there are many entities associated, there are many unnecessesary SQL queries and the performance suffers. Thanks Markus ---------------------------------------------------------------------- >Comment By: Markus Menner (morphace) Date: 2003-02-18 06:54 Message: Logged In: YES user_id=472900 This bug is really boaring, in my case it generates 1000's of unnecessesary SQL queries ... ---------------------------------------------------------------------- Comment By: Gavin King (oneovthafew) Date: 2003-02-15 00:05 Message: Logged In: YES user_id=384580 Very interesting. I was not aware of this issue. It looks remarkably difficult to fix! Really goes right to the heart of how Hibernate represents associations and 1-to-1 associations in particular. There would probably be some kind of ugly little fix for this but I don't have time to look closely at it right now. ---------------------------------------------------------------------- Comment By: Markus Menner (morphace) Date: 2003-02-14 16:26 Message: Logged In: YES user_id=472900 I tested this against Hibernate2 and it's the same behavior. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428708&aid=686577&group_id=40712 ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel