Игорь Т
05/20/2026, 12:46 PMRocky
05/20/2026, 12:47 PMSTRING is essentially an alias for VARCHAR(65533).
Usage Notes:
* Memory Efficiency: Even though STRING is variable-length, StarRocks may use the maximum defined length for memory pre-allocation in certain query execution stages. Therefore, it is generally recommended to use VARCHAR(n) with a specific length if you know the data will not exceed that size (e.g., VARCHAR(100) for an address), as this can be more memory-efficient than using STRING.
* Versioning: While the standard STRING limit is 65,533 bytes, starting from version 2.1, StarRocks increased the maximum possible length for the VARCHAR type to 1,048,576 bytes (1 MB). If you need strings longer than 65,533 bytes, you should explicitly use VARCHAR(1048576).
* Encoding: StarRocks supports UTF-8 encoding. Note that the length is defined in bytes, not characters (e.g., one Chinese character typically occupies 3 bytes).
References
• faq/table_design_faq.md
• sql-reference/System_limit.md
• knowledge/usage/best-practice.md
• sql-reference/data-types/string-type/STRING.md
• faq/Others.md
• sql-reference/data-types/string-type/BINARY.md