hibernate 写入性能暴差,如何配置
偶在做一个大量的数据采集项目,数据库使用的Mysql(先前已经测试,写入速度在100M的局域网上的速度大于3000/S).
为了省事偶使用了hibernate3,换了台服务器(此服务器直接写入速度大于1200/S,主要是带宽不足造成),
使用如下的配置
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>
<session-factory>
<property name="connection.username">root</property>
<property name="connection.url">
jdbc:mysql://192.168.0.199/newplat
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">mysqldriver</property>
<property name="connection.password">avcvdd</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">
org.hibernate.cache.EhCacheProvider
</property>
<property name="jdbc.batch_size">25</property>
<property name="connection.pool_size">0</property>
<property name="show_sql">false</property>
写入速度降低到30/S,在网路上查找无果,请教各位贤达!