Christian,
It looks like Hibernate is creating a new prepared statement for each row that is returned by the original query, then fetching that row, then closing the statement, and then reopening another statement, fetching another row, closing the statement, etc.
Is that normal? It certainly would create a lot of network traffic. What settings could I change to fix it?
Thanks, Brent
10:33:42,234 DEBUG SessionImpl:413 - opened session
10:33:42,234 DEBUG SessionImpl:1392 - iterate: select cnam from com.kihost.upsscs.cmedi.model.Cnam as cnam
10:33:42,234 DEBUG QueryTranslator:144 - compiling query
10:33:42,250 DEBUG SessionImpl:2011 - flushing session
10:33:42,250 DEBUG SessionImpl:2113 - Flushing entities and processing referenced collections
10:33:42,250 DEBUG SessionImpl:2397 - Processing unreferenced collections
10:33:42,250 DEBUG SessionImpl:2408 - Scheduling collection removes/(re)creates/updates
10:33:42,250 DEBUG SessionImpl:2023 - Flushed: 0 insertions, 0 updates, 0 deletions to 0 objects
10:33:42,250 DEBUG SessionImpl:2028 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
10:33:42,250 DEBUG SessionImpl:1573 - Dont need to execute flush
10:33:42,250 DEBUG QueryTranslator:200 - HQL: select cnam from com.kihost.upsscs.cmedi.model.Cnam as cnam
10:33:42,265 DEBUG QueryTranslator:201 - SQL: select cnam0_.cnam as x0_0_ from x_cnam cnam0_
10:33:42,265 DEBUG BatcherImpl:166 - about to open: 0 open PreparedStatements, 0 open ResultSets
10:33:43,593 DEBUG SessionFactoryImpl:526 - prepared statement get: select cnam0_.cnam as x0_0_ from x_cnam cnam0_
Hibernate: select cnam0_.cnam as x0_0_ from x_cnam cnam0_
10:33:43,609 DEBUG SessionFactoryImpl:536 - preparing statement
10:33:45,109 DEBUG IteratorImpl:54 - retrieving next results
10:33:45,125 DEBUG StringType:65 - returning '0033055' as column: x0_0_
10:33:45,125 DEBUG SessionImpl:1752 - loading [com.kihost.upsscs.cmedi.model.Cnam#0033055]
10:33:45,125 DEBUG SessionImpl:1843 - attempting to resolve [com.kihost.upsscs.cmedi.model.Cnam#0033055]
10:33:45,125 DEBUG SessionImpl:1887 - object not resolved in any cache [com.kihost.upsscs.cmedi.model.Cnam#0033055]
10:33:45,125 DEBUG EntityPersister:394 - Materializing entity: com.kihost.upsscs.cmedi.model.Cnam#0033055
10:33:45,125 DEBUG BatcherImpl:166 - about to open: 1 open PreparedStatements, 1 open ResultSets
10:33:45,125 DEBUG SessionFactoryImpl:526 - prepared statement get: select cnam0_.cnam as cnam, cnam0_.description as descript2_ from x_cnam cnam0_ where cnam0_.cnam=?
Hibernate: select cnam0_.cnam as cnam, cnam0_.description as descript2_ from x_cnam cnam0_ where cnam0_.cnam=?
10:33:45,125 DEBUG SessionFactoryImpl:536 - preparing statement
10:33:45,437 DEBUG StringType:44 - binding '0033055' to parameter: 1
10:33:46,406 DEBUG Loader:148 - processing result set
10:33:46,406 DEBUG Loader:260 - result row: 0033055
10:33:46,406 DEBUG Loader:357 - Initializing object from ResultSet: 0033055
10:33:46,406 DEBUG Loader:413 - Hydrating entity: com.kihost.upsscs.cmedi.model.Cnam#0033055
10:33:46,406 DEBUG StringType:65 - returning 'Apple COM' as column: descript2_
10:33:46,765 DEBUG Loader:182 - done processing result set (1 rows)
10:33:46,765 DEBUG BatcherImpl:173 - done closing: 1 open PreparedStatements, 1 open ResultSets
10:33:46,765 DEBUG SessionFactoryImpl:554 - closing statement
10:33:47,062 DEBUG Loader:195 - total objects hydrated: 1
10:33:47,062 DEBUG SessionImpl:1954 - resolving associations for [com.kihost.upsscs.cmedi.model.Cnam#0033055]
10:33:47,062 DEBUG SessionImpl:1975 - done materializing entity [com.kihost.upsscs.cmedi.model.Cnam#0033055]
10:33:47,062 DEBUG IteratorImpl:54 - retrieving next results
10:33:47,062 DEBUG StringType:65 - returning '0050334' as column: x0_0_
10:33:47,062 DEBUG SessionImpl:1752 - loading [com.kihost.upsscs.cmedi.model.Cnam#0050334]
10:33:47,078 DEBUG SessionImpl:1843 - attempting to resolve [com.kihost.upsscs.cmedi.model.Cnam#0050334]
10:33:47,078 DEBUG SessionImpl:1887 - object not resolved in any cache [com.kihost.upsscs.cmedi.model.Cnam#0050334]
10:33:47,078 DEBUG EntityPersister:394 - Materializing entity: com.kihost.upsscs.cmedi.model.Cnam#0050334
10:33:47,078 DEBUG BatcherImpl:166 - about to open: 1 open PreparedStatements, 1 open ResultSets
10:33:47,078 DEBUG SessionFactoryImpl:526 - prepared statement get: select cnam0_.cnam as cnam, cnam0_.description as descript2_ from x_cnam cnam0_ where cnam0_.cnam=?
Hibernate: select cnam0_.cnam as cnam, cnam0_.description as descript2_ from x_cnam cnam0_ where cnam0_.cnam=?
10:33:47,078 DEBUG SessionFactoryImpl:536 - preparing statement
10:33:47,500 DEBUG StringType:44 - binding '0050334' to parameter: 1
10:33:48,671 DEBUG Loader:148 - processing result set
10:33:48,671 DEBUG Loader:260 - result row: 0050334
10:33:48,687 DEBUG Loader:357 - Initializing object from ResultSet: 0050334
10:33:48,687 DEBUG Loader:413 - Hydrating entity: com.kihost.upsscs.cmedi.model.Cnam#0050334
10:33:48,687 DEBUG StringType:65 - returning 'Apple CO' as column: descript2_
10:33:49,093 DEBUG Loader:182 - done processing result set (1 rows)
10:33:49,093 DEBUG BatcherImpl:173 - done closing: 1 open PreparedStatements, 1 open ResultSets
10:33:49,093 DEBUG SessionFactoryImpl:554 - closing statement
10:33:49,484 DEBUG Loader:195 - total objects hydrated: 1
|