About setFirstResult

manual

Setting and Tuning of JPA Queries

Explains various JPA query settings - result range, flush and lock.... the following topics: Result Range (setFirstResult, setMaxResults) Flush Mode (setFlushMode) ... Query Hints Result Range (setFirstResult, setMaxResults) The setFirstResult ...

 
api-jpa

setFirstResult(startPosition)

Set the position of the first result to retrieve.(Method of javax.persistence.TypedQuery)

 
api-jpa

setFirstResult(startPosition)

Set the position of the first result to retrieve.(Method of javax.persistence.Query)

 
forum_thread

LIMIT or TOP functions

Is there LIMIT or TOP functions in object db? If so can you provide some examples? ... You can set query result range by using the setFirstResult setFirstResult(startPosition) TypedQuery's method Set the position ...

 
api-jpa

javax.persistence.TypedQuery

Interface used to control the execution of typed queries.(Interface of JPA)

 
api-jpa

javax.persistence.Query

Interface used to control query execution.(Interface of JPA)

 
issue

NPE at com.objectdb.jpa.JpaQuery.getResultList

This is very similar to issue #51  raised by kaosko .   So perhaps I should have added it there.  Anyway, here it is....   ... ( maxResults ) ; q. setFirstResult ( firstResult ) ; } ... ( maxResults ) ; q. setFirstResult ( firstResult ) ; } ...

 
forum_thread

Caching/Paging Questions...

Greetings ObjectDB team, All below questions assume a very large database (~1,000,000,000 objects): Q1: Two queries with a big overlap between their result sets. If I query the first set and hold the results in memory somehow, would that speed up the execution of the second query since many of its result objects already created and reside in memory ?... context ? Q4: Would paging result sets via setFirstResult and setMaxResult speed up the query execution since there are ... is no limit on the maximum size of the L2 cache. Using setFirstResult and setMaxResults could improve performance, but the effect is ...

 
forum_thread

Listing large number of complicated objects with paging.

Hi, For last few hours I was working on a problem with bad performance and memory problems with such a simple query: select prod from Product prod order by prod.id ASC Right now I have 55541 'Product' (attached to this post) entities in database and I'm trying to speed listing them with paging. The problem is, that running code that looks like this: ... , Product. class ) ; prodList = icQuery. setFirstResult ( start ) . setMaxResults ( count ) ... List<MyEntity> resultList = query. setFirstResult ( 20 ) . setMaxResults ( 10 ...

 
forum_thread

Iterating over large result set

Hi, Few days ago I was writing some code to iterate over quite a large dataset. Fitting those data in memory was quite a challenge even with 3GB heap space. So I did paging using two loops. ... ; for ( Tuple t : q. setFirstResult ( page ) . setMaxResults ( pageSize ...