cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Check Peck <comptechge...@gmail.com>
Subject Better way to define UDT's in Cassandra
Date Tue, 30 Jun 2020 17:42:51 GMT
We are trying to remove two columns in a table with 3 and make them UDT
instead of having them as columns. So we came up with two options below. I
wanted to understand if there is any difference between these two UDT in
the Cassandra database?


*One option is:*

>     CREATE TYPE test_type (
>         cid int,
>         type text,
>         hid int
>     );


and then using like this in a table definition

    test_types set<frozen<test_type>>,


vs

*Second option is:*

    CREATE TYPE test_type (
>         type text,
>         hid int
>     );


and then using like this in a table definition

    test_types map<int, frozen<test_type>


So just curious which one is the preferred option here for performance
related or they both are the same?

Mime
View raw message