How can I implement returning part of a large (1000+ rows) result set to the client?

Bozidar Dangubic

Try RowSet.

It is pretty fast and provides functionality you outlined above.

However, you will never be able to return first n rows "while result set is being loaded." although that is a nice functionality, it would be tremendously hard to implement it in the JDBC driver. you have no control of how data is obtained from the database unless you wrote the JDBC driver yourself. therefore, no luck there. you can try to combine some logic to access first n number of rows from the database, but request for n+1, n+2... records would require additional queries to the database which can get overly complex. so try RowSets. I am sure that you will be satisfied with the performance and functionality.