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.