storj / team-metainfo

GNU Affero General Public License v3.0
0 stars 0 forks source link

Explore use of column families #114

Open Fadila82 opened 2 years ago

Fadila82 commented 2 years ago

CockroachDB uses a kv store to store rows. For example, a segment with stream_id and position ( s, p) is stored as something like (metainfo_segments_s_p, root_piece_id_encrypted_key_nonce......inline_data_remote_pieces)

This makes us download all data each time we want an information about a segment, when in many cases we only need stream_id and position.

With column families, we would have as many kv store values per row as column families. For example, if we created a family for inline_data, we would get an additional kv entry which would look like: (metainfo_segments_s_p_inline_data, inline_data)

This would not be retrieved when we only want stream_id and position.

What we could get from that: