Send feedback on this topic.
Teradata.Client.Provider
When Are LOBs Optimized?
.NET Data Provider for Teradata > Developer's Guide > Performance Considerations And Best Practices > Lob Optimization When Sending Data > When Are LOBs Optimized?

Overview

The .NET Data Provider for Teradata will use either SLOB or In-Lining for optimizing how a LOB is sent to a Teradata Advanced SQL Engine depending upon what version of the SQL Engine is being used.  A LOB will only be optimized using SLOB when connected to a Teradata Database 15.0 or later release, and be In-Lined when connected to a release earlier than 15.0.

If a LOB cannot be optimized, the LOB will be sent using Deferred mode.

Conditions When a LOB Can Be Optimized

A LOB will be a candidate to be optimized when one of the following conditions are met:

It is not guaranteed that a LOB will be optimized if these conditions are met.  There may not be enough space in the data buffer to optimize all the LOBs.  In this situation, the LOBs that cannot be optimized will be sent to the SQL Engine using Deferred mode.

The Data Provider will optimize the smallest LOBs first. The size of the LOB is based on the TdParameter.Size property. If this property was not set, the length of the data in TdParameter.Value will be used if it is of type String, Char Array, or Byte Array.

Conditions When a LOB Will Not Get Optimized

A LOB parameter will not be eligible to be In-Lined or SLOB when one of the following conditions are meet:

However, if the TdParameter.Value property is set to a TextReader, Stream, or XmlReader and the TdParameter.Size is set to a value greater than 0, the LOB is eligible to be optimized using either In-Lining or SLOB. The TdParameter.Size will be used to determine whether the LOB will be able to fit in the data buffer.