VARIANT data type size limit

Viewed 406

What is the size limit imposed by VARIANT data type? 16MB compressed or 16MB uncompressed?

There are two places in the documentation which are conflicting. Which is correct ? enter image description here

enter image description here

2 Answers

This is one of the most common misunderstandings about variant columns ( thanks to the repeating error in the docs). A VARIANT can store values to a maximum size of 16 MB uncompressed.

https://docs.snowflake.com/en/sql-reference/data-types-semistructured.html#variant

The above page is updated recently, and you can see that the older version had the same error:

https://web.archive.org/web/20210522195216/https://docs.snowflake.com/en/sql-reference/data-types-semistructured.html

The limitation comes from a 16 MB limit on "internal" in-memory representation, which is uncompressed. I will report the one which is misleading:

https://docs.snowflake.com/en/user-guide/semistructured-considerations.html

Related