Configure Asynchronous Queries | Teradata Query Service - Configuring Asynchronous Queries - Teradata Query Service

Teradata® Query Service Installation, Configuration, and Usage Guide for Customers

Product
Teradata Query Service
Release Number
4.01.03.01
Published
April 2022
Language
English (United States)
Last Update
2022-06-20
dita:mapPath
xnt1648539781334.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2700
Product Category
Analytical Ecosystem
When you set queries with an asyncResponse flag, the result sets are saved. You can set limits for saving these metrics. You can first get the current limits and then change the values accordingly.

Run the following sample request:

curl -k -X GET 'https://<QS_HOSTNAME>:1443/general' --header 'Authorization: Basic <ADMIN_TOKEN>'

curl -k -X PUT 'https://<QS_HOSTNAME>:1443/general' \
--header 'Authorization: Basic <ADMIN_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
	"noRowsSpoolQuery":1000000,
	"noSpoolResultSets":1000,
	"retentionSpool":"25",
	"spaceAvailable":20,
	"spoolDirectory":"/var/opt/teradata/rest/daemon/spool/",
	"maxThreadCount":101
	
}'
Where:
Parameter Description
noRowsSpoolQuery Maximum number of rows that are returned by an asynchronous query.

Default value: 1,000,000

noSpoolResultSets Number of result sets to keep.

Increase the number if you have many short queries or a heavily used Query server.

After this setting is reached, the oldest spool files are automatically deleted until approximately 10% of the maximum result set count is deleted.

Default value: 1,000

retentionSpool Number of hours results are stored for asynchronous queries before they are deleted.

The minimum setting is 1 hour.

Every hour, all spool files that exceed the maximum retention time are deleted.

Default value: 24 hours

spaceAvailable Total allocated space, in gigabytes, for saving result sets of asynchronous queries before they are deleted.

After this setting is reached, the oldest spool files are automatically deleted until approximately 10% free space is reached.

Increase this number for a heavily used Query server.

Default value: 20 GB

spoolDirectory [Optional] Stores the result sets for asynchronous queries.

Default location: /var/opt/teradata/rest/daemon/spool