Calling Teradata Library Functions - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

Calling most of the Teradata library functions in an external stored procedure that uses CLIv2 involves several expensive context switches because the external stored procedure uses a different interface mode to execute most of the Teradata library functions.

Additionally, some of the Teradata library functions require that the external stored procedure wait for any outstanding CLIv2 requests to complete before calling them.

The exceptions are FNC_malloc and FNC_free, which do not incur any additional overhead.

The best practice for an external stored procedure that use CLIv2 to execute SQL is to use Teradata library functions judiciously.

For details on which library functions must wait for outstanding CLIv2 requests to complete before they are called, see C Library Functions.