Slide 10
Slide 10 text
Table と Key-Value
id c1 c2 c3
1 foo bar baz
2 hoge fuga piyo
3 (・ω・´) (´・ω・`) m9(^Д^)
key value
/Table/54/1/1/0/1615095374.173379261,0 c1: foo, c2: bar, c3: baz
/Table/54/1/2/0/1615095392.837630582,0 c1: hoge, c2: fuga, c3:piyo
/Table/54/1/3/0/1615095596.484809926,0 c1: (・ω・´), c2: (´・ω・`), c3: m9(^Д^)
test ※ id -> Primary Key
・Key-Value 形式に変換。
・Key で Sort。
・最近はデフォルトだと 1 record = 1 KV。
・Key は以下の形式で変換される。
・Key に Timestamp が含まれている。
/Table/Table ID/Primary Key ID/Value of PK/Column Family/Timestamp
https://github.com/cockroachdb/cockroach/blob/master/docs/tech-notes/encoding.md