Send feedback on this topic.
Teradata.Client.Provider
Row Layout And Data Marshaling
.NET Data Provider for Teradata > Developer's Guide > Performance Considerations And Best Practices > Row Layout And Data Marshaling

.NET Data Provider has to partition a byte array representing a row of data into its corresponding data field. Furthermore a field has to be converted from bytes into corresponding .NET Framework Data types. This process is simply known as marshaling. The Advanced SQL Engine supports fixed (For example, Integer) and variable size (For example, VarChar) data types. External representation of VarChar, VarByte, Blob and CLOB are also variable in size. It is recommended that a data row (For example, result of a SELECT statement) be designed with fixed length columns at the very beginning and Variable length columns at the very end. We also recommend experimenting with Server-Side and Client-Side data conversions. Server-Side data conversions, conversion performed by the SQL Engine, might improve the overall performance. That is use the CAST function or take advantage of implicit conversions. Refer to “Data Type Conversions” in SQL Reference – Volume 5.

Session Character Set impacts data marshaling, converting UNICODE data to and from Session Character Set, and the overall number of bytes transmitted between the SQL Engine and the .NET Data Provider. For example, UTF16 Session Character Set, as compared to UTF8 Session Character Set, increases the total number of bytes transmitted between the SQL Engine and .NET Data Provider if the data is mostly ASCII characters. However it will remove additional conversions by the .NET Data Provider from ASCII to Unicode.