Browse Source

configure hibernate batch updates

Lari Hotari 11 years ago
parent
commit
feda5a7f7e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      grails/hello/grails-app/conf/DataSource.groovy

+ 3 - 0
grails/hello/grails-app/conf/DataSource.groovy

@@ -36,6 +36,9 @@ hibernate {
     cache.use_second_level_cache = false
     cache.use_second_level_cache = false
     cache.use_query_cache = false
     cache.use_query_cache = false
     cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
     cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
+    default_batch_fetch_size=256
+    jdbc.fetch_size=256
+    jdbc.batch_size=500
 }
 }
 
 
 static Properties loadProperties(String path) {
 static Properties loadProperties(String path) {