Modeling data in Kassandra with columns that can be text or numbers

I have a table with 5 columns.

    1. ID -  number but it can stored as text or number
    2. name - text
    3. date - date value but can stored as date or text
    4. time - number but it can stored as text or number
    5. rating - number but it can stored as text or number

I want to find which data type will make my table faster for writing. How can i find. Does any Cassandra emphasize the barley for this?

+1
source share
1 answer

Regarding the answer provided by @ BryceAtNetwork23, this will be the same with Cassandra 2.1 or in Cassandra 2.2 (but Cassandra 3.0 is likely to be a different story since the team is currently rewriting the storage engine, see CASSANDRA-8099 ). Saved data is saved in binary format.

. , , , , ..

, cassandra.

  • , long Java, 8 , cassandra bigint , , . , , , - .

  • , , String Java, UTF-16 , Cassandra text UTF-8 . UTF-16 2 4 , UTF-8 1, 2, 3 4 .

    , /. , 158786464563, 12 . , -.

    . cassandra ascii, US-ASCII 1 .

  • UUID ( 128 ), Java UUID 2 long, 16 , Cassandra 16 ( Java UUID).

, , , . :

  • , , , [−9,223,372,036,854,775,808 ; +9,223,372,036,854,775,807], bigint
  • UUID
  • (, 100 . ), , text , , text .

- blob, .. , , , . , - . , , , , , ..

+2

Source: https://habr.com/ru/post/1681137/


All Articles