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 中的基数是什么?


基础教程推荐
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01