Re: [eclipselink-users] Paging large record set with EclipseLink Query using Sybase runs out of memory
I did a quick search and Sybase does support a LIMIT syntax for pagination,
if you log a bug please include this.
James Sutherland wrote:
> I'm not sure if Sybase supports pagination similar to Oracle. If it does
> please log a bug and include the SQL syntax required on Sybase. You could
> extend the Sybase platform with such syntax if it exists (please
> contribute the patch if you do). Or you could use the native SQL query in
> your code.
> It is odd that you run out of memory with firstResult, it will basically
> skip over the firstResult rows, so there should be nothing holding them in
> memory, it could be a JDBC driver issue. Make sure you create a new
> EntityManager for each page query, and ensure you are using a weak cache.
> You may also try increasing your JVM memory.
> You may also be able to page by some field in your object. i.e. where
> z.name > 'A' and z.name < 'C' (and page through A-Z).
> gsilverman wrote:
>> Has anyone found a way to page a large record set in EclipseLink without
>> running out of memory using Sybase?
>> I have a zip code entity, Zip, which basically maps to a zip table
>> storing zip codes, city, state and country information with 100,000s of
>> When I query using:
>> String query = "select z from Zip z";
>> Query q = entityManager.createQuery(query);
>> Everything is fine up to firstResult = 15000, but I get
>> "java.lang.OutOfMemoryError: Java heap space"
>> errors for firstResult greater than that.
>> I'm using Sybase as the underlying database, and I see in
>> wiki.eclipse.org/EclipseLink/Examples/JPA/Pagination a workaround for
>> Oracle. Does anyone have a fix for Sybase?
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
View this message in context: http://www.nabble.com/Paging-large-record-set-with-EclipseLink-Query-using-Sybase-runs-out-of-memory-tp19655400p19670026.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.