source: branches/3.18-stable/config/dist/hibernate.cfg.xml @ 7938

Last change on this file since 7938 was 7156, checked in by Nicklas Nordborg, 6 years ago

References #2009: PostgreSQL seems to be loading entire result set into memory

Adding jdbc.fetch_size configuration property to hibernate.cfg.xml. Hopefully Hibernate will pick it up wherever possible.

We are also picking it up in the BASE core API and use the same setting for queries were we bypass Hibernate.

It is verified to work for the raw data query in #2004 and http://baseplugins.thep.lu.se/ticket/887

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Date Id
File size: 5.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE hibernate-configuration PUBLIC
3  "-//Hibernate/Hibernate Configuration DTD//EN"
4  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
5<!--
6  $Id: hibernate.cfg.xml 7156 2016-05-24 11:57:41Z nicklas $
7
8  Copyright (C) 2006 Nicklas Nordborg
9
10  This file is part of BASE - BioArray Software Environment.
11  Available at http://base.thep.lu.se/
12
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 3
16  of the License, or (at your option) any later version.
17
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with BASE. If not, see <http://www.gnu.org/licenses/>.
25 
26  See http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html
27-->
28<hibernate-configuration>
29  <session-factory>
30 
31    <!-- JDBC/SQL options -->
32    <property name="jdbc.batch_size">0</property>
33    <property name="jdbc.fetch_size">1000</property>
34    <property name="show_sql">false</property>
35    <property name="connection.release_mode">after_transaction</property>
36 
37    <!-- Connection pool options -->
38    <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
39    <property name="c3p0.min_size">1</property>
40    <property name="c3p0.max_size">20</property>
41    <property name="c3p0.timeout">3600</property>
42   
43    <!-- Second-level cache options -->
44    <property name="cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>
45    <property name="cache.use_query_cache">true</property>
46    <property name="cache.use_second_level_cache">true</property>
47    <class-cache
48      class="net.sf.basedb.core.data.AnnotationTypeData"
49      usage="nonstrict-read-write"
50    />
51    <class-cache
52      class="net.sf.basedb.core.data.AnnotationTypeCategoryData"
53      usage="nonstrict-read-write"
54    />
55    <class-cache
56      class="net.sf.basedb.core.data.BioMaterialData"
57      usage="nonstrict-read-write"
58    />
59    <class-cache
60      class="net.sf.basedb.core.data.BioPlateData"
61      usage="nonstrict-read-write"
62    />
63    <class-cache
64      class="net.sf.basedb.core.data.BioPlateEventTypeData"
65      usage="nonstrict-read-write"
66    />
67    <class-cache
68      class="net.sf.basedb.core.data.BioPlateTypeData"
69      usage="nonstrict-read-write"
70    />
71    <class-cache
72      class="net.sf.basedb.core.data.DataFileTypeData"
73      usage="nonstrict-read-write"
74    />
75    <class-cache
76      class="net.sf.basedb.core.data.DirectoryData"
77      usage="nonstrict-read-write"
78    />
79    <class-cache
80      class="net.sf.basedb.core.data.ExperimentData"
81      usage="nonstrict-read-write"
82    />
83    <class-cache
84      class="net.sf.basedb.core.data.FormulaData"
85      usage="nonstrict-read-write"
86    />
87    <collection-cache
88      collection="net.sf.basedb.core.data.FormulaData.formulas"
89      usage="nonstrict-read-write"
90    />
91    <class-cache
92      class="net.sf.basedb.core.data.GroupData"
93      usage="nonstrict-read-write"
94    />
95    <class-cache
96      class="net.sf.basedb.core.data.HelpData"
97      usage="nonstrict-read-write"
98    />
99    <class-cache
100      class="net.sf.basedb.core.data.ItemSubtypeData"
101      usage="nonstrict-read-write"
102    />
103    <class-cache
104      class="net.sf.basedb.core.data.MimeTypeData"
105      usage="nonstrict-read-write"
106    />
107    <class-cache
108      class="net.sf.basedb.core.data.NewsData"
109      usage="nonstrict-read-write"
110    />
111    <class-cache
112      class="net.sf.basedb.core.data.PhysicalBioAssayData"
113      usage="nonstrict-read-write"
114    />
115    <class-cache
116      class="net.sf.basedb.core.data.PlateData"
117      usage="nonstrict-read-write"
118    />
119    <class-cache
120      class="net.sf.basedb.core.data.PlateEventTypeData"
121      usage="nonstrict-read-write"
122    />
123    <class-cache
124      class="net.sf.basedb.core.data.PlateGeometryData"
125      usage="nonstrict-read-write"
126    />
127    <class-cache
128      class="net.sf.basedb.core.data.PlateTypeData"
129      usage="nonstrict-read-write"
130    />
131    <class-cache
132      class="net.sf.basedb.core.data.PlatformData"
133      usage="nonstrict-read-write"
134    />
135    <class-cache
136      class="net.sf.basedb.core.data.PlatformVariantData"
137      usage="nonstrict-read-write"
138    />
139    <class-cache
140      class="net.sf.basedb.core.data.PluginConfigurationData"
141      usage="nonstrict-read-write"
142    />
143    <class-cache
144      class="net.sf.basedb.core.data.PluginDefinitionData"
145      usage="nonstrict-read-write"
146    />
147    <class-cache
148      class="net.sf.basedb.core.data.PluginTypeData"
149      usage="nonstrict-read-write"
150    />
151    <class-cache
152      class="net.sf.basedb.core.data.ProjectData"
153      usage="nonstrict-read-write"
154    />
155    <class-cache
156      class="net.sf.basedb.core.data.QuantityData"
157      usage="nonstrict-read-write"
158    />
159    <class-cache
160      class="net.sf.basedb.core.data.QuotaData"
161      usage="nonstrict-read-write"
162    />
163    <class-cache
164      class="net.sf.basedb.core.data.QuotaTypeData"
165      usage="nonstrict-read-write"
166    />
167    <class-cache
168      class="net.sf.basedb.core.data.RawBioAssayData"
169      usage="nonstrict-read-write"
170    />
171    <class-cache
172      class="net.sf.basedb.core.data.RoleData"
173      usage="nonstrict-read-write"
174    />
175    <class-cache
176      class="net.sf.basedb.core.data.TagData"
177      usage="nonstrict-read-write"
178    />
179    <class-cache
180      class="net.sf.basedb.core.data.UnitData"
181      usage="nonstrict-read-write"
182    />
183    <class-cache
184      class="net.sf.basedb.core.data.UnitSymbolData"
185      usage="nonstrict-read-write"
186    />
187    <class-cache
188      class="net.sf.basedb.core.data.UserData"
189      usage="nonstrict-read-write"
190    />
191    <class-cache
192      class="net.sf.basedb.core.data.ArrayDesignData"
193      usage="nonstrict-read-write"
194    />
195    <class-cache
196      class="net.sf.basedb.core.data.ArrayBatchData"
197      usage="nonstrict-read-write"
198    />
199    <class-cache
200      class="net.sf.basedb.core.data.ArraySlideData"
201      usage="nonstrict-read-write"
202    />
203  </session-factory>
204
205</hibernate-configuration>
206
Note: See TracBrowser for help on using the repository browser.