Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7735419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:29:51+00:00 2026-06-01T07:29:51+00:00

Normally when I want to query large result set using Mysql I write this

  • 0

Normally when I want to query large result set using Mysql I write this (taken from this answer):

stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(Integer.MIN_VALUE);

Now I’m using jOOQ 2.0.5 and I can’t achieve the same result.

I’ve tried calling fetchLazy with no luck, it loads the entire result set in memory:

Cursor<Record> result = query.fetchLazy(Integer.MIN_VALUE);

As a workaround I can get the sql query using query.getSQL() and create a suitable Statement to execute it.

Is there another way to have stream result sets using jOOQ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:29:53+00:00Added an answer on June 1, 2026 at 7:29 am

    According to the JDBC specs, Integer.MIN_VALUE is not a valid argument for the Statement.setFetchSize() method:

    Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects genrated by this Statement. If the value specified is zero, then the hint is ignored. The default value is zero.

    Parameters:

    rows the number of rows to fetch

    Throws:
    SQLException – if a database access error occurs, this method is called on a closed Statement or the condition rows >= 0 is not satisfied.

    Implementations may throw a SQLException for negative fetch sizes. Hence, jOOQ doesn’t accept parameters less than 0. You should try using a fetch size of 1 instead. In the mean time, the next release of jOOQ might be able to break the JDBC standard, to support this documented MySQL feature
    :

    https://github.com/jOOQ/jOOQ/issues/1263 (implemented in jOOQ 2.2.0)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so.. I'm using LinqToEntities, and I want to query part of a field. Normally
I want to fire an update query , normally using groovy we do something
I want to write a CMakeLists.txt so that I can run my tests normally
I want to update my sqlite table through query: UPDATE animals SET name =
Normally an HTML form sends query parameters as key-value pairs like this: http://blabla/?something=something&this=that But
Normally if I want to make a query on a table by date range
I want to issue a query like the following select max(col1), f(:1, col2) from
Normally I make something like this. #1 first query while () : #2 2nd
Normally i am using getString(R.string.) to query strings in xml file. Is there any
simple question: Does adding something like this to a query hurt performance in mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.