Reduce Memory Use With Fetch-Count - Aster Client

Teradata Aster® Client Guide

Product
Aster Client
Release Number
7.00
Published
May 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
hki1475000360386.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-2005
lifecycle
previous
Product Category
Software

The purpose of using fetch-count is to reduce the memory footprint of ACT on the server. Therefore, this type of configuration would normally be done by an administrator, or at least the setting would be made under an administrator’s guidance. To set a fetch-count, you specify a value for the fetch-count parameter in ACT. This causes ACT to fetch rows in sets, with each set containing only the user-specified number of rows (or fewer rows).

ACT uses a fetch count by default, i.e. even when fetch-count is not set explicitly. The fetch-count (number of rows per fetch) should always be set to greater than 0, The default value is 1024 rows.

To set the fetch-count in a running session of ACT, use the \set command to set the fetch-count parameter. To do this, type the following at the ACT prompt:

\set fetch-count n

where n is the maximum number of rows ACT should return at a time.

To enforce the fetch-count, ACT uses server side cursors to fetch results, which can help prevent the memory footprint of ACT from growing too large.
To the user, the results returned will not be different when using fetch-count. The purpose is simply to reduce the memory footprint of ACT on the server.