Cassandra: text vs varchar

前端 未结 4 822

Does anyone know the difference between the two CQL data types text and varchar in Cassandra? The Cassandra documentation describes both types as \

4条回答
  •  醉梦人生
    2020-12-29 02:44

    Cassandra CQL Data Types text and varchar are synonmys/alias for each other.

    1. Data Type associated to Varchar is blob(The max theoretical size for a blob is 2 GB)
    2. Data Type associated to text is Varchar (meaning even you have used text but Cassandra internally treats as Varchar)
    3. blob type association will not create performance issues because Cassandra stores data in constant hexadecimal number.
    4. Reads will be faster due to Cassandra queries the right coordinates using primary key (partition key, clustering column) depending on how we design our table.

提交回复
热议问题