8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 10 优化 / 10.2 优化 SQL 语句 / 10.2.6 优化数据库权限
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

10.2.6 优化数据库权限10.2.6 Optimizing Database Privileges

权限设置越复杂,所有 SQL 语句的开销就越大。简化通过 GRANT 语句建立的权限,可以使 MySQL 在客户端执行语句时减少权限检查开销。例如,如果您未授予任何表级或列级权限,服务器就无需检查 tables_priv 和 columns_priv 表的内容。类似地,如果您没有对任何账户设置资源限制,服务器就不需执行资源计数。如果您的语句处理负载非常高,可以考虑使用简化的授权结构来减少权限检查开销。The more complex your privilege setup, the more overhead applies to all SQL statements. Simplifying the privileges established by GRANT statements enables MySQL to reduce permission-checking overhead when clients execute statements. For example, if you do not grant any table-level or column-level privileges, the server need not ever check the contents of the tables_priv and columns_priv tables. Similarly, if you place no resource limits on any accounts, the server does not have to perform resource counting. If you have a very high statement-processing load, consider using a simplified grant structure to reduce permission-checking overhead.