本节介绍架构顾问程序。
许多应用程序需要生成唯一的编号和序列以用于识别目的,例如客户 ID、漏洞或故障单标签、会员编号或订单编号等。MySQL 执行此操作的机制是 AUTO_INCREMENT 列属性,它使您能够自动生成序列号。
但是,可以生成的数字范围受基础数据类型的限制。例如,TINYINT UNSIGNED 列的最大值可能为 255。如果您尝试生成一个超出基础数据类型允许的最大值的数字,例如通过将 NULL 值插入 AUTO_INCREMENT 列,则会触发数据库错误并且您的应用程序可能无法正常运行。
MySQL 中 AUTO_INCREMENT 的主要目的是生成一个正整数序列。不支持在 AUTO_INCREMENT 列中使用非正数,因此您也可以将这些列定义为 UNSIGNED,这样可以有效地将允许范围扩大一倍。
默认频率06:00:00
默认自动关闭是否启用
对于开发环境,更改数据库和对象可能是正常现象,但对于生产环境则不然。明智的做法是了解生产环境中关于任何数据库结构或功能的任何更改何时发生,并调查更改的原因。
默认频率00:10:00
默认自动关闭是否启用
MySQL 优化器需要索引统计信息来帮助选择是否使用索引来满足 SQL 查询。没有统计信息或过时的统计信息会限制优化器做出明智和明智的访问计划选择的能力。
默认频率12:00:00
默认自动关闭是否启用
SQL 模式定义了 MySQL 应该支持什么样的 SQL 语法以及它应该执行什么样的数据验证检查。如果没有启用 SQL 模式,这意味着没有任何形式的服务器强制数据完整性,这意味着无效的传入数据不会被服务器拒绝,而是被更改为符合目标列的默认数据类型。
任何客户端都可以随时更改自己的会话 SQL 模式值。
有关详细信息,请参阅服务器 SQL 模式。
默认频率06:00:00
默认自动关闭是否启用
SQL 模式定义了 MySQL 应该支持什么样的 SQL 语法以及它应该执行什么样的数据验证检查。有许多可能的选项可以相互结合使用,以指定 MySQL 服务器执行的不同程度的语法和数据验证检查。但是,为确保数据完整性的最高可信度,列表中至少应包含以下一项:TRADITIONAL,
STRICT_TRANS_TABLES,
或
STRICT_ALL_TABLES
.
有关详细信息,请参阅服务器 SQL 模式。
任何客户端都可以随时更改自己的会话 SQL 模式值。
默认频率06:00:00
默认自动关闭是否启用
For development environments, changes to databases and objects may be a normal occurrence, but not for production environments. It is wise to know when any changes occur in a production environment with respect to database structures and investigate the reasons for the changes.
Default frequency 00:10:00
Default auto-close enabled no
For development environments, changes to databases and objects may be a normal occurrence, but not for production environments. It is wise to know when any changes occur in a production environment with respect to database structures and investigate the reasons for the changes.
Default frequency 00:10:00
Default auto-close enabled no
For development environments, changes to databases and objects may be a normal occurrence, but not for production environments. It is wise to know when changes occur in a production environment with respect to database structures and investigate the reasons for the changes.
Default frequency 00:10:00
Default auto-close enabled no
A primary or unique key of a relational table uniquely identifies each record in the table. Except in very unusual circumstances, every database table should have one or more columns designated as the primary key or as a unique key, and it is common practice to declare one.
Tables lacking primary or unique keys can have a very negative
impact on replication performance when using
binlog_format=ROW
.
Default frequency 12:00:00
Default auto-close enabled no