JDBC and Array Processing

R

Ryan Gaffuri

How do I get the jdbc to use array processing when executing SQL? When
I use Oracle and Oracle's 'sqlplus' tool, I can set the arraysize
manually. This affects how many rows are retrieved from Oracle at a
time.
 
O

Oscar kind

Ryan Gaffuri said:
How do I get the jdbc to use array processing when executing SQL? When
I use Oracle and Oracle's 'sqlplus' tool, I can set the arraysize
manually. This affects how many rows are retrieved from Oracle at a
time.

This is called a fetch size in JDBC. See the method setFetchSize(int) in
the interface java.sql.Statement. This method determmines the maximum
number of rows fetched in one go from the database.

If you want to limit the total number of rows retrieved, use the method
setMaxRows(int) from the same interface.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top