A commit of this object (see mapping) takes 2 seconds. I enabled the sql-logger, just one sql-statement is executed:
NHibernate: UPDATE controlpropert SET Name = ?p0, ID_Ref = ?p1, ValueType = ?p2, Value = ?p3, ID_RefRole = ?p4, ID_RefControl = ?p5 WHERE ID = ?p6; ?p0 = 'xxx', ?p1 = '1004640', ?p2 = 'xxx', ?p3 = 'xxx', ?p4 = '68', ?p5 = '4663', ?p6 = '43'
Is this normal?
For FlushMode I tried different settings, currently I set it to "Auto".
Are there any other settings which could influence the runtime of the commit-statement?
This is my hibernate-configuration:
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<bytecode-provider type="lcg"/>
<reflection-optimizer use="true"/>
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.connection_string">
Server=xxxx;database=xxxx;port=3306;User Id=xxxx;Password=xxxx
</property>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
<property name="default_schema">dresden</property>
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
<property name="cache.use_minimal_puts">true</property>
<property name="cache.use_query_cache">true</property>
<property name="query.startup_check">false</property>
<property name="command_timeout">0</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
</session-factory>
</hibernate-configuration>
The mapping of the saved object:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="ControlProperty" table="controlproperty" dynamic-insert="false" dynamic-update ="false" >
<cache usage="read-write"/>
<id name="ID" column="ID" type="Int32" unsaved-value="0">
<generator class="identity" />
</id>
<property name="Name" column="Name" type="String" length="50" />
<property name="ID_Ref" column="ID_Ref" type="int"/>
<property name="ValueType" column="ValueType" type="String" length="50" />
<property name="ValueByte" column="Value" type="Byte[]"/>
<many-to-one name="Role" column="ID_RefRole" class="Role" cascade="none"/>
<many-to-one name="Control" column="ID_RefControl" class="Control" cascade="none"/>
</class>
</hibernate-mapping>