Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How to set JDBC fetch size on JPA query?
How to set JDBC fetch size on JPA query? [message #501317] Tue, 01 December 2009 20:32 Go to next message
David M. Karr is currently offline David M. Karr
Messages: 354
Registered: July 2009
Senior Member
Is it possible to modify the JDBC fetch size on a JPA query?

I'm considering a current piece of code that uses JDBC to process a resultset from a query that theoretically returns hundreds of thousands of rows, but my service only runs for a few minutes, only processing the records it can process in a time limit. The next time it runs, it runs a similar query and gets the rows that haven't been eliminated in the meantime. In this piece of code, I can tune the performance by changing the JDBC fetch size.

Could I do something similar with JPA, or perhaps a custom JPA extension to EclipseLink?
Re: How to set JDBC fetch size on JPA query? [message #501723 is a reply to message #501317] Thu, 03 December 2009 15:31 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

There is a Query hint for this in EclipseLink, "eclipselink.jdbc.fetch-size"

http://www.eclipse.org/eclipselink/api/1.2/org/eclipse/persi stence/config/QueryHints.html#JDBC_FETCH_SIZE


James : Wiki : Book : Blog : Twitter
Previous Topic:Virtual columns (@Formula of Hibernate)
Next Topic:CACHE_TYPE_DEFAULT
Goto Forum:
  


Current Time: Fri Oct 31 10:08:58 GMT 2014

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

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