All Forums Connectivity
sergiov 1 post Joined 12/06
21 Dec 2006
JDBC Fetch Size

Hi,I am trying to limit the number of rows that are being fetched by the result set at a time using the following code.Connection conn = DriverManager.getConnection( url, user, pass );Statement stmt = conn.createStatement();stmt.setFetchDirection( ResultSet.FETCH_FORWARD );stmt.setFetchSize( 100 );ResultSet rs = stmt.executeQuery( "SELECT * FROM table1, table2" );However, this does not seem to work. The entire result set is being loaded instead of 100 rows at a time. I am using the latest JDBC Dricer and Terdata DB version 6 release 2.I looked into the documentation for the JDBC driver and it states "the method issupported by the Teradata JDBC driver, but is not supported by the TeradataDatabase".Can anyone shed some light on this issue? or is there another way to perform this same task?Thanks

tomnolan 594 posts Joined 01/08
05 Jul 2012

The Statement.setFetchSize method is supported beginning with Teradata JDBC Driver 13.10.00.25 and Teradata Database 13.10.

More information is available in the Teradata JDBC Driver FAQ:

http://developer.teradata.com/doc/connectivity/jdbc/reference/current/faq.html#q7

 

You must sign in to leave a comment.