ODBC Connection User Guide > Getting Started > Controlling the Rowset Size
  

Controlling the Rowset Size
You can control the rowset size for database queries. The rowset size is defined as the number of rows that the DBMS returns to the client per network transmission.
The ability to change the rowset size allows you to tune PV‑WAVE ODBC Connection to optimize the performance of each query.
Small rowsets:
*reduce the amount of temporary memory needed to import a large dataset generated by a query.
*reduce the number of blocked processes on networks with heavy traffic.
*increase the time required to complete a query.
Large rowsets:
*reduce the time required to complete a query.
*increase the amount of temporary memory required.
*increase the number of blocked processes. .
To change the rowset size, modify the PV‑WAVE system variable !Odbc_Rowset_Size. For example:
!Odbc_Rowset_Size = 300 
The default value of !Odbc_Rowset_Size is 500.
All PV‑WAVE ODBC Connection routines check this system variable before accepting data from the DBMS. During the same connection, you can change the rowset size between one query and another.
For queries sent through the functions ODBC_SQL and ODBC_META, changing the rowset size does not affect the total number of rows returned, just the number of network transactions which are required to return all of the rows produced by the query. In the case of ODBC_PREPARE and ODBC_FETCH, the rowset size is the default number of rows returned for each call to ODBC_FETCH. For more details on how the value of !Odbc_Rowset_Size affects the results of ODBC_FETCH, refer to the descriptions of ODBC_PREPARE and ODBC_FETCH in the next chapter.

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.