Data types for character data
Character data can have either the CHAR or VARCHAR data type. Which data type is more efficient depends on the typical length of data in the field:
- If the size of actual data varies significantly, VARCHAR is more efficient because CHAR adds extra blank characters to fill the field. These blank characters must be transmitted across the network like any other characters.
- If the size of actual data does not vary much, CHAR is more efficient because each VARCHAR field has a few bytes of length information which must be transmitted.
Parent topic: DB2 Connect tuning