Hi,
We have been using the server-side DataSource (i.e. com.isomorphic.datasource.DataSource) for quite a while and it works well for us.
However, one of the operations that we use is DataSource.fetch(null) which fetches all rows in the DataSource at once. The returned object is a java.util.List that holds all the rows in the result set. When the result set is extremely large, this object will take up much memory in the server.
We would like to instead fetch N rows at a time, but it is not obvious to us how to do that. Can anyone shed some light on this?
One of the solutions that we have been thinking is to artificially adding one more column called rowNum, which will have an integer value starting from 1 and up. And then we add a "criteria" for rowNum. The first time from 1 to N, the second time from N+1 to 2N, and so on. Would this work? Would there be more straightforward method? (We have not used "criteria" before so would like to hear from you first before we try)
Thanks!
Our environment are listed below:
1. SmartClient Version: v8.3p_2013-01-15/PowerEdition Deployment (built 2013-01-15)
2. Browser: (not applicable)
3. Server log: (not applicable)
We have been using the server-side DataSource (i.e. com.isomorphic.datasource.DataSource) for quite a while and it works well for us.
However, one of the operations that we use is DataSource.fetch(null) which fetches all rows in the DataSource at once. The returned object is a java.util.List that holds all the rows in the result set. When the result set is extremely large, this object will take up much memory in the server.
We would like to instead fetch N rows at a time, but it is not obvious to us how to do that. Can anyone shed some light on this?
One of the solutions that we have been thinking is to artificially adding one more column called rowNum, which will have an integer value starting from 1 and up. And then we add a "criteria" for rowNum. The first time from 1 to N, the second time from N+1 to 2N, and so on. Would this work? Would there be more straightforward method? (We have not used "criteria" before so would like to hear from you first before we try)
Thanks!
Our environment are listed below:
1. SmartClient Version: v8.3p_2013-01-15/PowerEdition Deployment (built 2013-01-15)
2. Browser: (not applicable)
3. Server log: (not applicable)
Comment