Teradata 13.10 added support for setFetchSize() in there jdbc driver. When a user sets the MaxResults our code would force the FetchSize to be limited to the MaxResults size. This is standard for all of the native connections. The issue is that the MaxResults hint does not get passed to the Teradata database and the jdbc driver has to truncate the results after the full results of a sql query has been retrieved. So reconfiguring the fetchsize limit to the max results limit affects the retrieval time in an unintended way.
We should test this for all our native drivers and make sure that if the MaxResults setting has to do the work at the jdbc driver level, we are not reconfiguring the fetchsize limit to MaxResults size.
How to test:
Create a table with 100,000 records. Configure FetchSize to standard 5000. Select * from <created table>. set maxresults in query analyzer to 1. execute the query. If the maxresults hint is not handled at the database level, the data retrieval will have to retrieve 1 record per connection, this will bring the query results time exponentially higher.
215 KB
Teradata will no longer reconfigure the fetchsize to be limited to maxresults size.
From Ivan:
Work around for Teradata JDBC driver bug when setting Max Results. If network is slow and full resultset (without Max Results) is large, then the last call to Statement.getMoreResults() will block and wait until all rows (without Max Results) are retreived.
From Ivan:
Work around for Teradata JDBC driver bug when setting Max Results. If network is slow and full resultset (without Max Results) is large, then the last call to Statement.getMoreResults() will block and wait until all rows (without Max Results) are retreived.
Issue #14203 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v16.0.12, v17.0.0-ga-28, v18.0.0-dev-35 |
No time estimate |
Teradata will no longer reconfigure the fetchsize to be limited to maxresults size.