About setMaxResults

manual

Setting and Tuning of JPA Queries

Explains various JPA query settings - result range, flush and lock.... topics: Result Range (setFirstResult, setMaxResults) Flush Mode (setFlushMode) Lock Mode ... Hints Result Range (setFirstResult, setMaxResults) The setFirstResult ... See JavaDoc Reference Page... and  setMaxResults setMaxResults(maxResult) TypedQuery's method Set ...

 
api-jpa

setMaxResults(maxResult)

Set the maximum number of results to retrieve.(Method of javax.persistence.TypedQuery)

 
api-jpa

setMaxResults(maxResult)

Set the maximum number of results to retrieve.(Method of javax.persistence.Query)

 
forum_thread

About LIMIT and OFFSET as query tokens

Hi,   I would like to know why the query tokens OFFSET AND LIMIT are not available and if they will be in a near future. Is there any equivalent way to get, from the database, the object at given position i as well as a given number of objects that follow such object? Thanks you in advance   MiguelGT       Thanks you in advance ... specify a result range using setFirstResult and setMaxResults . ObjectDB Support ObjectDB - ...

 
forum_thread

LIMIT or TOP functions

Is there LIMIT or TOP functions in object db? If so can you provide some examples? ... retrieve. See JavaDoc Reference Page... and setMaxResults setMaxResults(maxResult) TypedQuery's method Set the maximum number ...

 
api-jpa

javax.persistence.TypedQuery

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

 
forum_thread

JPA and handling large data sets

This is not a rellay ObjectDB problem, rather a JPA problem. Our web-based DB supports Hibernate or JPA (ElicpseLink/ObjectDB). We implemented a export/import class to export the whole database or single datasets (domains) in a persistence layer/database independent format. This class works fine - DB exports form a Hibernate/MySQL base via the independent formt to ObjectDB is possible. But exporting large binary data sets is very slow. To avoid memory problems the binary data type is read step by step during the export with the  query/setFirstResult() & setMaxResults().... the export with the  query/setFirstResult() & setMaxResults(). But for large data sets the way is slow. We have an own entity ... Using query result range ( setFirstResult , setMaxResults ) for this purpose is indeed inefficient, because some query ...

 
api-jpa

javax.persistence.Query

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

 
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: ... = icQuery. setFirstResult ( start ) . setMaxResults ( count ) . getResultList ( ) ; ... are you trying to retrieve in every query execution ( setMaxResults ). Does that number affect? You may try running the ...

 
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 ?... maximum size of the L2 cache. Using setFirstResult and setMaxResults could improve performance, but the effect is highly dependent on ...