Spring JDBC support and large dataset

前端 未结 5 686
眼角桃花
眼角桃花 2020-12-14 02:56

When using one of the various JDBC template methods I am confused on how to iterate/scroll over large result sets (which won\'t fit into memory). Even without a direct expos

5条回答
  •  醉梦人生
    2020-12-14 03:16

    here's a good library for pulling java sql resultsets all into memory.

    http://casperdatasets.googlecode.com

    you can scroll / iterate through the dataset, you can issue queries against it, and build indexes for optimization. it also implements the java.sql.resultset interface so you can continue to operate on results from this dataset with minimals chnages to your jdbc code.

提交回复
热议问题