IFX_PAD_VARCHAR environment variable

The IFX_PAD_VARCHAR environment variable setting controls how the database server sends and receives VARCHAR and NVARCHAR data values. Valid IFX_PAD_VARCHAR values are 1 and 0.

1  setenv IFX_PAD_VARCHAR
2.1 1
2.1 0
1
Transmit the entire structure, up to the declared max size.
0
Transmit only the portion of the structure containing data.

For example, to send the string "ABC" from a column declared as NVARCHAR(255) when IFX_PAD_VARCHAR is set to 0 would send 3 bytes.

If the setting were 1 in the previous example, however, the number of bytes sent would be 255 bytes.

The effect IFX_PAD_VARCHAR is context-sensitive. In a low-bandwidth network, a setting of 0 might improve performance by reducing the total volume of transmitted data. But in a high-bandwidth network, a setting of 1 might improve performance, if the CPU time required to process variable-length packets were greater than the time required to send the entire character stream. In cross-server distributed operations, this setting has no effect, and padding characters are dropped from VARCHAR or NVARCHAR values that are passed between database servers.