56. Which of the following are factors for fields that should influence a shard key value? Check all that apply:
题目选项
- A.High cardinality, lots of unique possible values.
- B.Low cardinality, few unique possible values.
- C.High frequency, lots of repetition of the possible values.
- D.Low frequency, only a few or no repetition of the possible values.
答案置信度:高
正确答案:A、D
解析语言:中文
理想的分片键要高基数(A:取值足够多,chunk 才能继续切分)且低频(D:同一取值重复少,不会形成热点)。低基数会导致无法再分裂的巨型 chunk(B 错),高频次会造成读写热点、负载不均(C 错)。