Specifies the minimum default length, in characters, of fields that are mapped as VARCHAR when a multiplier value is specified for the DefaultVarcharSize configuration option (DefaultVarcharSize=multiplier).
MinVarcharSize enforces a minimum size for the default length of VARCHAR fields that are determined by multiplying the value of the DefaultVarcharSize configuration option by the largest value detected in that column. When the default length would be less than the minimum value specified for this option, the driver increases the default length to the minimum. When correctly configured, this option can prevent the undesired truncation of VARCHAR values.
Valid Values
x
where:
x
is the maximum size of the default length in characters given to columns that are mapped as VARCHAR.
Example
For example, MinVarcharSize is set to 1000 and DefaultVarcharSize is set to 3x. When the largest detected value in a column mapped to VARCHAR is 1000 characters, the driver determines that the default length for that column is 3000 characters by multiplying the size of the largest detected value (1000) by the setting of DefaultVarcharSize (3). However, suppose the largest detected value is 200 characters. The driver calculates a default length of 600 characters, but, since this would be less than the setting for MinVarcharSize, the length is set to 1000.
Notes
This option can be configured to avoid the undesired truncation of values by enforcing a minimum size of fields that are mapped as VARCHAR.
You can configure a maximum limit for the default length of fields that are mapped as VARCHAR using the MaxVarcharSize configuration option.
The default length of fields for columns mapped as VARCHAR can be overridden using the Schema Tool. See About Column Information and Statistics for details.