fetchsize in resultset set to 0 by default

后端 未结 3 695
無奈伤痛
無奈伤痛 2021-01-14 17:37

I have to query a database and result set is very big. I am using MySQL as data base. To avoid the \"OutOfMemoryError\" after a lot of search I got two options:

3条回答
  •  忘掉有多难
    2021-01-14 18:05

    In MySQL connector-j 5.1 implementation notes, they said there are 2 ways to handle this situation.

    enter image description here

    The 1st is to make the statement retrieve data row by row, the 2nd can support batch retrieve.

提交回复
热议问题