Hi, I'm new to TeraData. I want to know how to write a sql query where i can limit the number of rows returned. my intention is, say there are 1000 records in the table. i want to load those 1000 records, 100 records at a time by running a query 10 times.
Really appreciate your support
Hi, it has details about customers. some int, string and date fields will be there. and has few million records. i'm writing a java application to read the table and write into a file. i need to load this table into memory blockwise to reduce the memory utilization.
When the Teradata JDBC Driver fetches rows from the Teradata Database, only 1 MB of row data is fetched at a time.
As the Java application scrolls through the ResultSet (for example, using the ResultSet.next method), the Teradata JDBC Driver will fetch more rows as needed, always 1 MB of row data at a time.
It is NOT the case that the Teradata JDBC Driver reads all rows from the Teradata Database, for a ResultSet containing more than 1 MB of row data.
You said that you "need to load this table into memory blockwise to reduce the memory utilization". As I've described, the Teradata JDBC Driver does that for you automatically.