Java JDBC ignores setFetchSize?

前端 未结 5 1405
余生分开走
余生分开走 2020-11-30 07:59

I\'m using the following code

 st = connection.createStatement(
            ResultSet.CONCUR_READ_ONLY,
            ResultSet.FETCH_FORWARD,
            Resu         


        
5条回答
  •  醉话见心
    2020-11-30 08:44

    This will depend on your driver. From the docs:

    Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.

    Note that it says "a hint" - I would take that to mean that a driver can ignore the hint if it really wants to... and it sounds like that's what's happening.

提交回复
热议问题