|[Solved] How can I set the defaultRowPrefetch size on the datasource? [message #718892]
||Thu, 25 August 2011 15:06
| David Mulligan
Registered: February 2010
My project's dba has asked that we try changing the defaultRowPrefetch size as an attempt to improve performance. No method I've tried to set this on the data source changes the number of rows loaded per fetch from 10. Of course I can set the fetch size per query but either deciding which queries actually need it or setting it on each one is an arduous task for a test.|
I had a peak at eclipselink's source and as far as I can tell the default fetch size is hard coded to 0 which presumably makes it use the oracle default.
If possible our preference is to find a configuration change to set the default so we can deploy the change to production without requiring a new build of our application.
The two ways that I tried to set this were:
- In Tomcat's configuration as an attribute on the JNDI resource element. eg connectionProperties="defaultRowPrefetch=500"
- While setting up the Mapping Project I grab the DatabaseLogin and set the property there. I've tried both an Integer and a String. eg project.getLogin().setProperty("defaultRowPrefetch", 666);
Either way though I am looking for a way to set a default fetch size for eclipselink running on Oracle 11g. We are using Eclipselink 1.1.3 in production and 2.2.0 in development.
[Updated on: Thu, 25 August 2011 22:49]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01762 seconds