Code Monkey home page Code Monkey logo

Comments (7)

rbygrave avatar rbygrave commented on July 16, 2024

I have pushed up a fix. On the DatabasePlatform there is a forwardOnlyHintOnFindIterate. This is set to true on the MySqlPlatform. For creating PreparedStatements for findIterate() and findVisit() this databasePlatform hint is checked and if set creates the statement with the appropriate hints.

So out of the box this fix is specific to MySql and findIterate() or findVisit().

If you can pull/build and confirm this fixes your specific case that would be great.

from ebean.

Ronnie76er avatar Ronnie76er commented on July 16, 2024

Thanks, I'll give it a shot this week and let you know how it goes.

from ebean.

Ronnie76er avatar Ronnie76er commented on July 16, 2024

Sorry for the delay. This seems to be working well now.

I tested this in my play application, first without it there, and then with it there. Without it, the memory after using findIterate, but before iterating through the values, had sharply risen.

Updating to use 3.2.5, the memory didn't start going down until after iterating through the list provided by findIterate.

from ebean.

rbygrave avatar rbygrave commented on July 16, 2024

Right so I'll close this issue as fixed then.

from ebean.

Ronnie76er avatar Ronnie76er commented on July 16, 2024

I apologize, but I think it may still be gathering the entire resultset in memory. Using a debugger on the code, it seems that the fetchSize is getting set to 0, instead of Integer.MIN_VALUE. I think the fetchSize getting set is important to indicate to the driver that the results should be streamed.

from ebean.

rbygrave avatar rbygrave commented on July 16, 2024

Yes, I have reproduced this and it is not fixed without

pstmt.setFetchSize(Integer.MIN_VALUE);

from ebean.

rbygrave avatar rbygrave commented on July 16, 2024

Fixed in 4.0.1

from ebean.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.