|
From: NHibernate J. <mik...@us...> - 2007-05-07 14:23:55
|
Select statement issued for each not-found=ignore
-------------------------------------------------
Key: NH-1001
URL: http://jira.nhibernate.org/browse/NH-1001
Project: NHibernate
Type: Bug
Components: Core
Versions: 1.2.0.Alpha1, 1.2.0.Beta1, 1.2.0.Beta2, 1.2.0.Beta3, 1.2.0.CR1, 1.2.0.CR2, 1.2.0.GA
Reporter: Tomer Avissar
Priority: Minor
When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <mik...@us...> - 2007-05-07 14:44:05
|
[ http://jira.nhibernate.org/browse/NH-1001?page=all ] Sergey Koshcheyev updated NH-1001: ---------------------------------- Version: (was: 1.2.0.CR2) (was: 1.2.0.CR1) (was: 1.2.0.Beta3) (was: 1.2.0.Beta2) (was: 1.2.0.Beta1) (was: 1.2.0.Alpha1) And what do you want it to do? > Select statement issued for each not-found=ignore > ------------------------------------------------- > > Key: NH-1001 > URL: http://jira.nhibernate.org/browse/NH-1001 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.GA > Reporter: Tomer Avissar > Priority: Minor > > When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join. > In some cases this causes a significant performance overhead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-05-07 15:09:49
|
[ http://jira.nhibernate.org/browse/NH-1001?page=comments#action_15540 ] Tomer Avissar commented on NH-1001: ----------------------------------- I want it to skip the subsequent queries for the child objects. Since an outer join was performed, NHibernate already "knows" the child records don't exist, so there is no use in requerying the table. > Select statement issued for each not-found=ignore > ------------------------------------------------- > > Key: NH-1001 > URL: http://jira.nhibernate.org/browse/NH-1001 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.GA > Reporter: Tomer Avissar > Priority: Minor > > When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join. > In some cases this causes a significant performance overhead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-05-31 07:32:54
|
[ http://jira.nhibernate.org/browse/NH-1001?page=comments#action_15633 ] Sergey Koshcheyev commented on NH-1001: --------------------------------------- I need a test case. > Select statement issued for each not-found=ignore > ------------------------------------------------- > > Key: NH-1001 > URL: http://jira.nhibernate.org/browse/NH-1001 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.GA > Reporter: Tomer Avissar > Priority: Minor > > When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join. > In some cases this causes a significant performance overhead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-06-10 12:59:40
|
[ http://jira.nhibernate.org/browse/NH-1001?page=3Dall ] Tomer Avissar updated NH-1001: ------------------------------ Attachment: HRNHibernateTest.zip This test case is against the Oracle "HR" schema, the file db.xls displays = the relevant rows (I tried to create the test case on the xsl directly, but= apparently excel doesn=E2=80=99t support join).=20 The case is demonstrated in the Form1_Load method. the "sql generated.txt" file (in the zip) contains the sql generated, taken= from the VS output window. > Select statement issued for each not-found=3Dignore > ------------------------------------------------- > > Key: NH-1001 > URL: http://jira.nhibernate.org/browse/NH-1001 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.GA > Reporter: Tomer Avissar > Priority: Minor > Attachments: HRNHibernateTest.zip > > When using the not-found=3Dignore attribute in a one-to-many/many-to-many= , NHibernate is issuing a query for every element not found in the collecti= on, even when using an outer join.=20 > In some cases this causes a significant performance overhead. --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-06-13 22:22:48
|
[ http://jira.nhibernate.org/browse/NH-1001?page=comments#action_15662 ] Jesse commented on NH-1001: --------------------------- This issue also shows up in many-to-one assosciations that are eagerly fetched. So I assume it shows up anywhere that you can specify not-found=ignore. So the mapping below should not product an additional query when no result is initially found. <many-to-one name="Stock" access="nosetter.camelcase-underscore" class="RentalStock" column="intProductId" lazy="false" fetch="join" not-found="ignore" /> If the association is not found on the initial query, an additional query will be issued to the database to try and retrieve the association again. There is no need for any extra query since this should be determined by the first query. Or is there some reason that a second query needs to be issued? There is no second query when the association is found on the first query. This problem magnifies itself if batching is enabled. It will issue a batch query multiple times for the number of proxies in the session to find out if the entity exists. > Select statement issued for each not-found=ignore > ------------------------------------------------- > > Key: NH-1001 > URL: http://jira.nhibernate.org/browse/NH-1001 > Project: NHibernate > Type: Bug > Components: Core > Versions: 1.2.0.GA > Reporter: Tomer Avissar > Priority: Minor > Attachments: HRNHibernateTest.zip > > When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join. > In some cases this causes a significant performance overhead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: NHibernate J. <mik...@us...> - 2007-09-21 21:31:57
|
[ http://jira.nhibernate.org/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Koshcheyev updated NH-1001:
----------------------------------
Fix Version/s: 1.2.1
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://jira.nhibernate.org/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <mik...@us...> - 2007-11-11 23:59:57
|
[ http://jira.nhibernate.org/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_16047 ]
Karl Chu commented on NH-1001:
------------------------------
Added test. r3093
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://jira.nhibernate.org/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <mik...@us...> - 2007-11-18 12:16:57
|
[ http://jira.nhibernate.org/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Koshcheyev updated NH-1001:
----------------------------------
Fix Version/s: (was: 1.2.1)
LATER
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://jira.nhibernate.org/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Fix For: LATER
>
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <nh...@gm...> - 2008-06-13 17:24:20
|
[ http://jira.nhibernate.org/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo updated NH-1001:
----------------------------
Fix Version/s: (was: 2.0.0.Alpha2)
2.1.0.Alpha1
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://jira.nhibernate.org/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Fix For: 2.1.0.Alpha1
>
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <nh...@gm...> - 2008-09-30 12:22:34
|
[ http://jira.nhibernate.org/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo updated NH-1001:
----------------------------
Fix Version/s: (was: 2.1.0.Alpha1)
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://jira.nhibernate.org/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: NHibernate J. <nh...@gm...> - 2010-01-20 09:56:37
|
[ http://nhjira.koah.net/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19007#action_19007 ]
Tobias Johansson commented on NH-1001:
--------------------------------------
This bug is causing serious performance issues in some of our applications. Because of the extra select statements generated when an entry is not found a query that should take 10-20ms takes close to 2 seconds.
In the description of this bug it is mentioned it affects one-to-many/many-to-many but it also affects one-to-one mappings (using References())
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://nhjira.koah.net/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://nhjira.koah.net/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Data H. (JIRA) <nh...@gm...> - 2011-02-25 13:19:31
|
[ http://216.121.112.228/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20594#action_20594 ]
Data Hero commented on NH-1001:
-------------------------------
Version 2.1.2.4000 is also affected
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://216.121.112.228/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Tomer A. (JIRA) <nh...@gm...> - 2011-02-28 15:43:28
|
[ http://216.121.112.228/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20604#action_20604 ]
Tomer Avissar commented on NH-1001:
-----------------------------------
It's been a while since I logged this, but if I recall correctly, the issue is if you like to view it that way, is that the first level cache does not work for non existing records. Meaning, when NHibernate queries an entity (either by ID or through join) and receives no records, it does not save this information and therefore will query this entity over and over again, even though in each time it will get no records.
For example if I have a "Employee" entity with a many-to-one "Department" entity, if I change the many-to-one fetch mode to join, Instead of getting only one single joined statement, I will still get many select statements for each employee that did not exist in the employee table.
BTW: One more problem that the not-found="ignore" brings, is that if I had an Employee object with DEPARTMENT_ID=5 that does not exist, It will result in a NULL value in the Department property. Upon flush, it will update the DEPARTMENT_ID value to NULL.
I would expect NHibernate to not update this column in this case, but a guess that's a matter for a new issue.
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://216.121.112.228/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-10 23:08:18
|
[ http://216.121.112.228/browse/NH-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21045#action_21045 ]
Fabio Maulo commented on NH-1001:
---------------------------------
Yes Tomer....
The solution is clean the DB from invalid relations.
> Select statement issued for each not-found=ignore
> -------------------------------------------------
>
> Key: NH-1001
> URL: http://216.121.112.228/browse/NH-1001
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.0.GA
> Reporter: Tomer Avissar
> Priority: Minor
> Attachments: HRNHibernateTest.zip
>
>
> When using the not-found=ignore attribute in a one-to-many/many-to-many, NHibernate is issuing a query for every element not found in the collection, even when using an outer join.
> In some cases this causes a significant performance overhead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|