Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [Solved] How can I set the defaultRowPrefetch size on the datasource?(Default fetch size for Eclipselink and Oracle)
[Solved] How can I set the defaultRowPrefetch size on the datasource? [message #718892] Thu, 25 August 2011 15:06 Go to next message
David Mulligan is currently offline David MulliganFriend
Messages: 13
Registered: February 2010
Junior Member
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.

Thank you,
David

[Updated on: Thu, 25 August 2011 22:49]

Report message to a moderator

Re: How can I set the defaultRowPrefetch size on the datasource? [message #719057 is a reply to message #718892] Thu, 25 August 2011 22:49 Go to previous message
David Mulligan is currently offline David MulliganFriend
Messages: 13
Registered: February 2010
Junior Member
It turns out that my datasource factory was being overridden in an application specific configuration file. The tomcat configuration method I listed above works for us.
(no subject) [message #719071 is a reply to message #718892] Thu, 25 August 2011 22:49 Go to previous message
David Mulligan is currently offline David MulliganFriend
Messages: 6
Registered: November 2009
Junior Member
It turns out that my datasource factory was being overridden in an application specific configuration file. The tomcat configuration method I listed above works for us.
Previous Topic:2 hibernate machines against one database machine
Next Topic:Incorrect OSGI versioning on milestone builds?
Goto Forum:
  


Current Time: Thu Apr 25 10:43:26 GMT 2024

Powered by FUDForum. Page generated in 0.03258 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top