Using JDBC to asynchronously read large Oracle table

Posted by Ben George on Programmers See other posts from Programmers or by Ben George
Published on 2014-04-26T09:45:11Z Indexed on 2014/05/26 22:01 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

What strategies can be used to read every row in a large Oracle table, only once, but as fast as possible with JDBC & Java ?

Consider that each row has non-trivial amounts of data (30 columns, including large text in some columns).

Some strategies I can think of are:

  • Single thread and read table. (Too slow, but listed for clarity)
  • Read the id's into ConcurrentLinkedQueue, use threads to consume queue and query by id in batches.
  • Read id's into a JMS queue, use workers to consume queue and query by id in batches.

What other strategies could be used ?

For the purpose of this question assume processing of rows to be free.

© Programmers or respective owner

Related posts about java

Related posts about Performance