Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VARIANT data type size limit

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

like image 247
ajcoder Avatar asked Dec 21 '25 10:12

ajcoder


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

like image 123
Gokhan Atil Avatar answered Dec 24 '25 10:12

Gokhan Atil


AFTER The VARIANT data type imposes a 16 MB (compressed) size limit on individual rows. https://docs.snowflake.net/manuals/user-guide/semistructured-considerations.html

like image 25
Srinath Menon Avatar answered Dec 24 '25 10:12

Srinath Menon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!