What is cardinality in MySQL?(MySQL 中的基数是什么?)
问题描述
MySQL 中的基数是什么?请用简单的非技术语言解释.
What is cardinality in MySQL? Please explain in simple, non-technical language.
如果任何表的索引详细信息显示一个字段的基数,例如 group_id 为 11,那么这意味着什么?
If a index detail of any table displays the cardinality of a field say group_id as 11, then what does that mean?
推荐答案
Max cardinality: All values are unique
Max cardinality: All values are unique
最小基数:所有值都相同
Min cardinality: All values are the same
有些列被称为高基数列,因为它们有限制(如唯一),禁止您在每一行中放置相同的值.
Some columns are called high-cardinality columns because they have constraints in place (like unique) prohibiting you from putting the same value in every row.
基数是影响聚类、排序和搜索数据能力的属性.因此,对于数据库中的查询计划者来说,这是一个重要的衡量标准,是他们可以用来选择最佳计划的启发式方法.
Cardinality is a property which affects the ability to cluster, sort and search data. It is therefore an important measurement for the query planners in DBs, it is a heuristic which they can use to choose the best plans.
这篇关于MySQL 中的基数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL 中的基数是什么?
基础教程推荐
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 在多列上分布任意行 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
