You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "123alf (via GitHub)" <gi...@apache.org> on 2025/01/23 02:18:19 UTC

[D] Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily? [kvrocks]

GitHub user 123alf created a discussion: Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily?

Method 1: Currently, for hash data, we store TTL and other metadata in the MetadataColumnFamily, while the fields are stored in the PrimarySubkeyColumnFamily. The hget operation queries both ColumnFamilies separately.

Method 2: We still store the metadata and the fields in different keys, but within a single ColumnFamily. Since they are stored adjacently, the hget operation will produce fewer I/O operations.

Why did we choose Method 1? I couldn't find any related documentation, and I'm looking forward to your response.

GitHub link: https://github.com/apache/kvrocks/discussions/2729

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily? [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
GitHub user PragmaTwice edited a comment on the discussion: Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily?

Hi, thank you for your question.

If we store metadata and subkey in a single column family, SCAN operations will be inefficient (also for SCAN-related operations, e.g. key counting).

However, we are welcome if you have better ideas, or want to propose another encoding.

GitHub link: https://github.com/apache/kvrocks/discussions/2729#discussioncomment-11924069

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily? [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
GitHub user PragmaTwice edited a comment on the discussion: Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily?

Hi, thank you for your question.

If we store metadata and subkey in a single column family, SCAN operations will be inefficient.

However, we are welcome if you have better ideas, or want to propose another encoding.

GitHub link: https://github.com/apache/kvrocks/discussions/2729#discussioncomment-11924069

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org


Re: [D] Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily? [kvrocks]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
GitHub user PragmaTwice added a comment to the discussion: Why do we divide into PrimarySubkeyColumnFamily and MetadataColumnFamily?

Hi, thank you for your question.

If we store metadata and subkey in a single column family, all these SCAN operations will be inefficient.

However, we are welcome if you have better ideas, or want to propose another encoding.

GitHub link: https://github.com/apache/kvrocks/discussions/2729#discussioncomment-11924069

----
This is an automatically sent email for issues@kvrocks.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@kvrocks.apache.org