cfs.inode如何解决'Secondary indexes cardinality'?

How to solve 'Secondary indexes cardinality' for cfs.inode?

在 OpsCenter 6.0.3 中,我遇到了以下问题

依次点击'Services' -> 'Best Practice Service' -> 'Performance Service - Table Metrics Advisor' -> 'Secondary indexes cardinality'出现上图

在 DevCenter 中查看的 inode table 如下所示:

据我所知,[inode]link 跟踪每个文件的元数据和块位置。但是,我该怎么做才能解决这个问题?

OpsCenter 版本:6.0.3 Cassandra 版本:2.1.15.1423 DataStax 企业版:4.8.10

不要对高基数列使用二级索引

High-cardinality refers to columns with values that are very uncommon or unique. High-cardinality column values are typically identification numbers, email addresses, or user names. An example of a data table column with high-cardinality would be a USERS table with a column named USER_ID.

使用高基数列索引 datastax 文档时出现问题:

If you create an index on a high-cardinality column, which has many distinct values, a query between the fields will incur many seeks for very few results. In the table with a billion songs, looking up songs by writer (a value that is typically unique for each song) instead of by their artist, is likely to be very inefficient. It would probably be more efficient to manually maintain the table as a form of an index instead of using the Cassandra built-in index. For columns containing unique data, it is sometimes fine performance-wise to use an index for convenience, as long as the query volume to the table having an indexed column is moderate and not under constant load.

解法:

使用分区键中的该列创建另一个 table