Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Optimization batch reading collection after invalidation
Optimization batch reading collection after invalidation [message #1809365] Mon, 15 July 2019 02:53 Go to next message
Sebastien Tardif is currently offline Sebastien TardifFriend
Messages: 6
Registered: November 2009
Junior Member
Any optimization available in EclipseLink that would avoid doing a SQL for each item in the collection having expired children?

You can run the main entry from the class Application, the log will finish with the output below, showing one select for each item in the collection. I'm looking for an existing feature in EclipseLink that could make this not happening. I believe Hibernate can handle that with https://docs.jboss.org/hibernate/orm/3.5/reference/en/html/performance.html#performance-fetching-batch.
If no feature exist to handle that, could you open a feature request?




[EL Fine]: sql: 2019-07-10 18:01:37.248--ServerSession(1837601499)--Connection(17331878)--Thread(Thread[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM ADDRESS WHERE (ID = ?)
bind => [2]
[EL Fine]: sql: 2019-07-10 18:01:37.249--ServerSession(1837601499)--Connection(1311052922)--Thread(Thread[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM ADDRESS WHERE (ID = ?)
bind => [3]
[EL Fine]: sql: 2019-07-10 18:01:37.25--ServerSession(1837601499)--Connection(810576909)--Thread(Thread[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM ADDRESS WHERE (ID = ?)
bind => [4]
[EL Fine]: sql: 2019-07-10 18:01:37.25--ServerSession(1837601499)--Connection(1629759610)--Thread(Thread[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM ADDRESS WHERE (ID = ?)
bind => [5]
[EL Fine]: sql: 2019-07-10 18:01:37.251--ServerSession(1837601499)--Connection(775423528)--Thread(Thread[main,5,main])--SELECT ID, FIRSTNAME, LASTNAME FROM ADDRESS WHERE (ID = ?)
bind => [6]
  • Attachment: Sample.zip
    (Size: 10.67KB, Downloaded 18 times)
Re: Optimization batch reading collection after invalidation [message #1810471 is a reply to message #1809365] Mon, 12 August 2019 14:05 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1330
Registered: July 2009
Senior Member
Batch fetching can be added to your queries using query hints:
https://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/q_batch.htm

Or to the model relationship via annotation:
https://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_batchfetch.htm

Previous Topic:java.lang.IllegalStateException: Could not load the JPQL parser class.
Next Topic:Passing Collection List to In clause in nativeQuery - EclipseLink
Goto Forum:
  


Current Time: Mon Oct 21 11:19:14 GMT 2019

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

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

Back to the top