-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Save dauert sehr lange
PostPosted: Thu May 04, 2006 6:46 am 
Newbie

Joined: Thu May 04, 2006 5:28 am
Posts: 3
Hallo,

ich habe ein schwerwiegendes Problem: Das speichern eines Objektes mit vielen (bzw. sehr vielen Kinderobjekten) dauert sehr (sehr) lange!

Hibernate version: hibernate3.1
Name and version of the database you are using:MySQL 5.0.17
Mapping documents:Project, Attribute, Case, Value

Beschreibung:Ein Projekt besteht aus mehreren Attributen und mehreren Cases. Jedes Attribut hat in jedem Case einen Value! Anschaulich erklärt: Zum Beispiel: Ein Projekt besitzt die Attribute a1, a2, a3.
Die cases mit entsprechenden values für jedes Attribute!
case 1: a1 = "1", a2 = "11", a3 = "test1"
case 2: a1 = "2", a2 = "22", a3 = "test2"
case 3: a1 = "3", a2 = "33", a3 = "test3"

Falls ich jetzt ein save des Projektes aufrufe, werden alle Objekte gespeichert... also 3 Attribute, 3 Cases und 9 Values.

Besitzt ein Projekt 100 attribute und 500 Cases müssen allerdings 50.000 Values gespeichert werden. [Hinzu kommt, dass Value eine SuperKlasse ist und je nach dem welchen datentyp der Wert hat, ist das Objekt ein StringValue, Integervalue oder DoubleValue.]

Und das dauert dann zwischen 3 und 5 Minuten, was für eine Anwendung natürlich deutlich zu lange ist. Vielleicht habe ich ein Confgurationsfehler begangen? Kann ich den save-Vorgang irgendwie beschleunigen??? Ist die Vierecksbeziehung ein Problem?? [Projekt hat attributes und cases, cases haben values, values haben cases und attributes]

Kann mir jemand helfen??? Wäre sehr(sehr) dankbar...


MappingFiles (etwas vereifacht):
Projekt:

Code:
<hibernate-mapping>
   <class name="de.fhg.iese.osr.model.OSRProject" table="osrproject">
        <id name="ID" column="id" type="java.lang.Integer">
            <generator class="native"/>
        </id>
   
        <property name="name" type="string" column="name"/>
   
        <set name="cases" lazy="true" inverse="false" cascade="all">
           <key column="osrproject_id"/>
           <one-to-many class="de.fhg.iese.osr.model.Case"/>
        </set>
       
   <list name="attributes" lazy="true" inverse="false" cascade="all">

           <key column="osrproject_id"/>
           <index column="position"/>
           
           <one-to-many class="de.fhg.iese.osr.model.Attribute"/>
        </list>   
       
    </class>
</hibernate-mapping>



Attribute:

Code:
<hibernate-mapping>
   <class name="de.fhg.iese.osr.model.Attribute" table="attribute">
        <id name="ID" column="id" type="java.lang.Integer">
            <generator class="native"/>
        </id>
       
        <property name="name" type="string" column="name"/>
                     
        <many-to-one
           name="osrProject"
           column="osrproject_id"
           class="de.fhg.iese.osr.model.OSRProject"
           not-null="true"/>
             
    </class>
</hibernate-mapping>



Case:

Code:
<hibernate-mapping>
   <class name="de.fhg.iese.osr.model.Case" table="caseTable">
        <id name="ID" column="id" type="java.lang.Integer">
            <generator class="native"/>
        </id>
       
        <property name="name" type="string" column="name"/>
       
      <property name="selected" type="boolean" column="selected"/>
       
        <many-to-one
           name="osrProject"
           column="osrproject_id"
           class="de.fhg.iese.osr.model.OSRProject"
           not-null="true"/>
           
        <set name="values" lazy="false" inverse="true" cascade="all">
           <key column="case_id"/>
           <one-to-many class="de.fhg.iese.osr.model.Value"/>
        </set>
     
    </class>
</hibernate-mapping>



Value:

Code:
<hibernate-mapping>
   <class name="de.fhg.iese.osr.model.Value" table="value">
        <id name="ID" column="id" type="java.lang.Integer">
            <generator class="native"/>
        </id>

        <many-to-one
           name="attribute"
           column="attribute_id"
           class="de.fhg.iese.osr.model.Attribute"
           not-null="false"/>
       
        <many-to-one
           name="currentCase"
           column="case_id"
           class="de.fhg.iese.osr.model.Case"
           not-null="false"/>
           
        <joined-subclass
           name="de.fhg.iese.osr.model.StringValue" table="string_value">
           
           <key column="id"/>
         <property name="value" type="string" column="value"/>

        </joined-subclass>
       
        <joined-subclass
           name="de.fhg.iese.osr.model.IntegerValue" table="integer_value">
           
         <key column="id"/>
         <property name="value" type="integer" column="value"/>
       
        </joined-subclass>
       
        <joined-subclass
           name="de.fhg.iese.osr.model.DoubleValue" table="double_value">
           
           <key column="id"/>
         <property name="value" type="double" column="value"/>

        </joined-subclass>
       
    </class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
Transaction tx = session.beginTransaction();

   session.saveOrUpdate(item);
   
   tx.commit();



The generated SQL (show_sql=true):


12:26:06,678 INFO Environment:479 - Hibernate 3.1
12:26:06,698 INFO Environment:509 - hibernate.properties not found
12:26:06,698 INFO Environment:525 - using CGLIB reflection optimizer
12:26:06,698 INFO Environment:555 - using JDK 1.4 java.sql.Timestamp handling
12:26:06,799 INFO Configuration:1286 - configuring from resource: /hibernate.cfg.xml
12:26:06,799 INFO Configuration:1263 - Configuration resource: /hibernate.cfg.xml
12:26:06,959 INFO Configuration:468 - Reading mappings from resource: de/fhg/iese/osr/model/OSRProject.hbm.xml
12:26:07,149 INFO HbmBinder:265 - Mapping class: de.fhg.iese.osr.model.OSRProject -> osrproject
12:26:07,500 INFO Configuration:468 - Reading mappings from resource: de/fhg/iese/osr/model/Attribute.hbm.xml
12:26:07,550 INFO HbmBinder:265 - Mapping class: de.fhg.iese.osr.model.Attribute -> attribute
12:26:07,550 INFO Configuration:468 - Reading mappings from resource: de/fhg/iese/osr/model/Case.hbm.xml
12:26:07,580 INFO HbmBinder:265 - Mapping class: de.fhg.iese.osr.model.Case -> caseTable
12:26:07,580 INFO Configuration:468 - Reading mappings from resource: de/fhg/iese/osr/model/Value.hbm.xml
12:26:07,610 INFO HbmBinder:265 - Mapping class: de.fhg.iese.osr.model.Value -> value
12:26:07,610 INFO HbmBinder:839 - Mapping joined-subclass: de.fhg.iese.osr.model.StringValue -> string_value
12:26:07,610 INFO HbmBinder:839 - Mapping joined-subclass: de.fhg.iese.osr.model.IntegerValue -> integer_value
12:26:07,610 INFO HbmBinder:839 - Mapping joined-subclass: de.fhg.iese.osr.model.DoubleValue -> double_value
12:26:07,610 INFO Configuration:1397 - Configured SessionFactory: null
12:26:07,610 INFO Configuration:1022 - processing extends queue
12:26:07,620 INFO Configuration:1026 - processing collection mappings
12:26:07,620 INFO HbmBinder:2276 - Mapping collection: de.fhg.iese.osr.model.OSRProject.cases -> caseTable
12:26:07,620 INFO HbmBinder:2276 - Mapping collection: de.fhg.iese.osr.model.OSRProject.attributes -> attribute
12:26:07,620 INFO HbmBinder:2276 - Mapping collection: de.fhg.iese.osr.model.Case.values -> value
12:26:07,620 INFO Configuration:1035 - processing association property references
12:26:07,630 INFO Configuration:1057 - processing foreign key constraints
12:26:07,650 INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:26:07,650 INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 3
12:26:07,650 INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:26:07,660 INFO DriverManagerConnectionProvider:80 - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost:3306/osr
12:26:07,660 INFO DriverManagerConnectionProvider:83 - connection properties: {user=root, password=123}
12:26:07,660 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
12:26:07,660 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection
12:26:07,960 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:mysql://localhost:3306/osr, Isolation Level: 4
12:26:07,960 INFO SettingsFactory:77 - RDBMS: MySQL, version: 5.0.17-nt
12:26:07,960 INFO SettingsFactory:78 - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.0-beta ( $Date: 2005-11-17 16:14:47 +0100 (Thu, 17 Nov 2005) $, $Revision$ )
12:26:07,960 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
12:26:08,000 INFO Dialect:103 - Using dialect: org.hibernate.dialect.MySQLDialect
12:26:08,010 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:26:08,010 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:26:08,020 INFO SettingsFactory:125 - Automatic flush during beforeCompletion(): disabled
12:26:08,020 INFO SettingsFactory:129 - Automatic session close at end of transaction: disabled
12:26:08,020 INFO SettingsFactory:136 - JDBC batch size: 15
12:26:08,020 INFO SettingsFactory:139 - JDBC batch updates for versioned data: disabled
12:26:08,020 INFO SettingsFactory:144 - Scrollable result sets: enabled
12:26:08,020 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): enabled
12:26:08,020 INFO SettingsFactory:160 - Connection release mode: auto
12:26:08,020 INFO SettingsFactory:184 - Maximum outer join fetch depth: 2
12:26:08,020 INFO SettingsFactory:187 - Default batch fetch size: 1
12:26:08,030 INFO SettingsFactory:191 - Generate SQL with comments: disabled
12:26:08,030 INFO SettingsFactory:195 - Order SQL updates by primary key: disabled
12:26:08,030 INFO SettingsFactory:338 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:26:08,030 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTranslatorFactory
12:26:08,030 INFO SettingsFactory:203 - Query language substitutions: {}
12:26:08,030 INFO SettingsFactory:209 - Second-level cache: enabled
12:26:08,030 INFO SettingsFactory:213 - Query cache: disabled
12:26:08,040 INFO SettingsFactory:325 - Cache provider: org.hibernate.cache.NoCacheProvider
12:26:08,040 INFO SettingsFactory:228 - Optimize cache for minimal puts: disabled
12:26:08,040 INFO SettingsFactory:237 - Structured second-level cache entries: disabled
12:26:08,050 INFO SettingsFactory:264 - Statistics: disabled
12:26:08,050 INFO SettingsFactory:268 - Deleted entity synthetic identifier rollback: disabled
12:26:08,050 INFO SettingsFactory:283 - Default entity-mode: pojo
12:26:08,100 INFO SessionFactoryImpl:153 - building session factory
12:26:09,012 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
12:26:09,022 INFO SessionFactoryImpl:353 - Checking 0 named HQL queries
12:26:09,022 INFO SessionFactoryImpl:373 - Checking 0 named SQL queries
12:26:09,162 DEBUG JDBCTransaction:54 - begin
12:26:09,162 DEBUG ConnectionManager:313 - opening JDBC connection
12:26:09,162 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0
12:26:09,162 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0
12:26:09,162 DEBUG JDBCTransaction:59 - current autocommit status: false
12:26:09,162 DEBUG JDBCContext:202 - after transaction begin
12:26:09,202 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,202 DEBUG SQL:346 - insert into osrproject (name, filename, description, uploaddate) values (?, ?, ?, ?)
12:26:09,212 DEBUG AbstractBatcher:424 - preparing statement
12:26:09,232 DEBUG StringType:79 - binding '' to parameter: 1
12:26:09,232 DEBUG StringType:79 - binding 'C:\Dokumente und Einstellungen\Admin\Eigene Dateien\Files\testCsv.txt' to parameter: 2
12:26:09,232 DEBUG TextType:79 - binding '' to parameter: 3
12:26:09,242 DEBUG TimestampType:79 - binding '2006-05-04 12:26:05' to parameter: 4
12:26:09,262 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:09,262 DEBUG AbstractBatcher:470 - closing statement
12:26:09,262 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,272 DEBUG SQL:346 - insert into caseTable (name, selected, osrproject_id) values (?, ?, ?)
12:26:09,272 DEBUG AbstractBatcher:424 - preparing statement
12:26:09,272 DEBUG StringType:79 - binding 'Case.9' to parameter: 1
12:26:09,272 DEBUG BooleanType:79 - binding 'true' to parameter: 2
12:26:09,282 DEBUG IntegerType:79 - binding '23' to parameter: 3
12:26:09,282 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:09,282 DEBUG AbstractBatcher:470 - closing statement
12:26:09,282 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,282 DEBUG SQL:346 - insert into value (attribute_id, case_id) values (?, ?)
12:26:09,302 DEBUG AbstractBatcher:424 - preparing statement
12:26:09,312 DEBUG IntegerType:71 - binding null to parameter: 1
12:26:09,312 DEBUG IntegerType:79 - binding '3020' to parameter: 2
12:26:09,312 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:09,312 DEBUG AbstractBatcher:470 - closing statement
12:26:09,312 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,312 DEBUG SQL:346 - insert into string_value (value, id) values (?, ?)
12:26:09,312 DEBUG AbstractBatcher:424 - preparing statement
12:26:09,312 DEBUG StringType:79 - binding 'Washington4' to parameter: 1
12:26:09,312 DEBUG IntegerType:79 - binding '187854' to parameter: 2
12:26:09,312 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:09,312 DEBUG AbstractBatcher:470 - closing statement
12:26:09,322 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,322 DEBUG SQL:346 - insert into value (attribute_id, case_id) values (?, ?)
12:26:09,322 DEBUG AbstractBatcher:424 - preparing statement
12:26:09,322 DEBUG IntegerType:71 - binding null to parameter: 1
12:26:09,322 DEBUG IntegerType:79 - binding '3020' to parameter: 2
12:26:09,332 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:09,332 DEBUG AbstractBatcher:470 - closing statement
12:26:09,332 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:09,332 DEBUG SQL:346 - insert into string_value (value, id) values (?, ?)

...

12:26:11,115 DEBUG IntegerType:79 - binding '432' to parameter: 1
12:26:11,115 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,115 DEBUG IntegerType:79 - binding '187891' to parameter: 3
12:26:11,115 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,115 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,115 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,115 DEBUG IntegerType:79 - binding '431' to parameter: 1
12:26:11,115 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,115 DEBUG IntegerType:79 - binding '187892' to parameter: 3
12:26:11,115 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,115 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,125 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,125 DEBUG IntegerType:79 - binding '430' to parameter: 1
12:26:11,125 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,125 DEBUG IntegerType:79 - binding '187893' to parameter: 3
12:26:11,125 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,125 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,125 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,125 DEBUG IntegerType:79 - binding '429' to parameter: 1
12:26:11,125 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,125 DEBUG IntegerType:79 - binding '187894' to parameter: 3
12:26:11,125 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,125 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,135 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,135 DEBUG IntegerType:79 - binding '428' to parameter: 1
12:26:11,135 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,135 DEBUG IntegerType:79 - binding '187895' to parameter: 3
12:26:11,135 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,135 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,135 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,135 DEBUG IntegerType:79 - binding '433' to parameter: 1
12:26:11,135 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,145 DEBUG IntegerType:79 - binding '187896' to parameter: 3
12:26:11,145 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,145 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,145 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,145 DEBUG IntegerType:79 - binding '432' to parameter: 1
12:26:11,145 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,145 DEBUG IntegerType:79 - binding '187897' to parameter: 3
12:26:11,145 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,145 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,145 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,145 DEBUG IntegerType:79 - binding '431' to parameter: 1
12:26:11,155 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,155 DEBUG IntegerType:79 - binding '187898' to parameter: 3
12:26:11,155 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,155 DEBUG AbstractBatcher:55 - Executing batch size: 15
12:26:11,165 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,165 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,165 DEBUG IntegerType:79 - binding '430' to parameter: 1
12:26:11,165 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,165 DEBUG IntegerType:79 - binding '187899' to parameter: 3
12:26:11,165 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,165 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,165 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,165 DEBUG IntegerType:79 - binding '429' to parameter: 1
12:26:11,175 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,175 DEBUG IntegerType:79 - binding '187900' to parameter: 3
12:26:11,175 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,175 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,175 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,175 DEBUG IntegerType:79 - binding '428' to parameter: 1
12:26:11,175 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,175 DEBUG IntegerType:79 - binding '187901' to parameter: 3
12:26:11,175 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,175 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,175 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,175 DEBUG IntegerType:79 - binding '433' to parameter: 1
12:26:11,175 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,185 DEBUG IntegerType:79 - binding '187902' to parameter: 3
12:26:11,185 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,185 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,185 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,185 DEBUG IntegerType:79 - binding '432' to parameter: 1
12:26:11,185 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,185 DEBUG IntegerType:79 - binding '187903' to parameter: 3
12:26:11,185 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,185 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,185 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,185 DEBUG IntegerType:79 - binding '431' to parameter: 1
12:26:11,185 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,195 DEBUG IntegerType:79 - binding '187904' to parameter: 3
12:26:11,195 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,195 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,195 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,195 DEBUG IntegerType:79 - binding '430' to parameter: 1
12:26:11,195 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,195 DEBUG IntegerType:79 - binding '187905' to parameter: 3
12:26:11,195 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,195 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,195 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,195 DEBUG IntegerType:79 - binding '429' to parameter: 1
12:26:11,205 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,205 DEBUG IntegerType:79 - binding '187906' to parameter: 3
12:26:11,205 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,205 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,205 DEBUG SQL:346 - update value set attribute_id=?, case_id=? where id=?
12:26:11,205 DEBUG IntegerType:79 - binding '428' to parameter: 1
12:26:11,205 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,205 DEBUG IntegerType:79 - binding '187907' to parameter: 3
12:26:11,205 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,205 DEBUG AbstractBatcher:55 - Executing batch size: 9
12:26:11,215 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:11,215 DEBUG AbstractBatcher:470 - closing statement
12:26:11,215 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:11,215 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,215 DEBUG AbstractBatcher:424 - preparing statement
12:26:11,215 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,215 DEBUG IntegerType:79 - binding '3020' to parameter: 2
12:26:11,225 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,225 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,225 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,225 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,225 DEBUG IntegerType:79 - binding '3021' to parameter: 2
12:26:11,225 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,225 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,225 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,225 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,225 DEBUG IntegerType:79 - binding '3022' to parameter: 2
12:26:11,225 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,225 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,235 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,235 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,235 DEBUG IntegerType:79 - binding '3023' to parameter: 2
12:26:11,235 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,235 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,235 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,235 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,235 DEBUG IntegerType:79 - binding '3024' to parameter: 2
12:26:11,235 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,235 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,235 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,245 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,245 DEBUG IntegerType:79 - binding '3025' to parameter: 2
12:26:11,245 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,245 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,245 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,245 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,245 DEBUG IntegerType:79 - binding '3026' to parameter: 2
12:26:11,245 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,245 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,245 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,245 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,245 DEBUG IntegerType:79 - binding '3027' to parameter: 2
12:26:11,245 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,245 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,245 DEBUG SQL:346 - update caseTable set osrproject_id=? where id=?
12:26:11,255 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,255 DEBUG IntegerType:79 - binding '3028' to parameter: 2
12:26:11,255 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,255 DEBUG AbstractBatcher:55 - Executing batch size: 9
12:26:11,265 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:11,265 DEBUG AbstractBatcher:470 - closing statement
12:26:11,265 DEBUG AbstractBatcher:311 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
12:26:11,265 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,265 DEBUG AbstractBatcher:424 - preparing statement
12:26:11,265 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,265 DEBUG IntegerType:79 - binding '0' to parameter: 2
12:26:11,265 DEBUG IntegerType:79 - binding '428' to parameter: 3
12:26:11,265 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,265 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,275 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,275 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,275 DEBUG IntegerType:79 - binding '1' to parameter: 2
12:26:11,275 DEBUG IntegerType:79 - binding '429' to parameter: 3
12:26:11,275 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,275 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,275 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,275 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,275 DEBUG IntegerType:79 - binding '2' to parameter: 2
12:26:11,275 DEBUG IntegerType:79 - binding '430' to parameter: 3
12:26:11,285 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,285 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,285 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,285 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,285 DEBUG IntegerType:79 - binding '3' to parameter: 2
12:26:11,285 DEBUG IntegerType:79 - binding '431' to parameter: 3
12:26:11,285 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,285 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,285 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,285 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,285 DEBUG IntegerType:79 - binding '4' to parameter: 2
12:26:11,285 DEBUG IntegerType:79 - binding '432' to parameter: 3
12:26:11,295 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,295 DEBUG AbstractBatcher:175 - reusing prepared statement
12:26:11,295 DEBUG SQL:346 - update attribute set osrproject_id=?, position=? where id=?
12:26:11,295 DEBUG IntegerType:79 - binding '23' to parameter: 1
12:26:11,295 DEBUG IntegerType:79 - binding '5' to parameter: 2
12:26:11,295 DEBUG IntegerType:79 - binding '433' to parameter: 3
12:26:11,295 DEBUG AbstractBatcher:28 - Adding to batch
12:26:11,295 DEBUG AbstractBatcher:55 - Executing batch size: 6
12:26:11,305 DEBUG AbstractBatcher:319 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
12:26:11,305 DEBUG AbstractBatcher:470 - closing statement
12:26:11,305 DEBUG JDBCTransaction:103 - commit
12:26:11,305 DEBUG JDBCContext:193 - before transaction completion
12:26:11,345 DEBUG JDBCTransaction:116 - committed JDBC Connection
12:26:11,345 DEBUG JDBCContext:207 - after transaction completion
12:26:11,345 DEBUG ConnectionManager:296 - aggressively releasing JDBC connection
12:26:11,345 DEBUG ConnectionManager:333 - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
12:26:11,345 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
12:26:11,345 DEBUG ConnectionManager:267 - connection already null in cleanup : no action
12:26:11,345 DEBUG ConnectionManager:267 - connection already null in cleanup : no action



Code:


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 06, 2006 6:20 pm 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
Hallo,

Du könntest versuchen inverse=true auch beim Projekt zu setzen,
statt sets generell lists zu verwenden, dann werden die nicht zu updatenden Sachen besser erkennt im Vergleich zu sets.
Bei den Sets equals und hashset implementieren. Ich vermute, bin mir aber nicht 100 % sicher, dass dann auch weniger Statements erzeugt werden.
cascade auf none zu setzen.

Gruß Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.