From: <leg...@at...> - 2003-11-09 06:27:14
|
The following comment has been added to this issue: Author: Gavin King Created: Sun, 9 Nov 2003 12:27 AM Body: fixed (finally) for load(), get() and Criteria queries .... other cases to come: HQL queries, collection initialization. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-12 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-12 Summary: low performance loading with optional 1-1 association Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Assignee: Gavin King Reporter: Max Rydahl Andersen Created: Sat, 3 May 2003 10:02 AM Updated: Sat, 3 May 2003 10:02 AM Description: low performance loading with optional 1-1 association 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 (Original: http://sourceforge.net/tracker/index.php?func=detail&aid=686577&group_id=40712&atid=428708) --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |