Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

《高性能mysql第三版》学习笔记 #85

Open
kekobin opened this issue Jul 13, 2020 · 0 comments
Open

《高性能mysql第三版》学习笔记 #85

kekobin opened this issue Jul 13, 2020 · 0 comments

Comments

@kekobin
Copy link
Owner

kekobin commented Jul 13, 2020

image

第一章

事务

image
image
image
image
image

image

image
image
image
image

第4章 Schema 与数据类型优化

更小的通常更好
一般情况下,应该尽量使用可以正确存储数据的最小数据类型。更小的数据类型通常更快,因为它们占用更少的磁盘、内存和CPU缓存,并且处理时需要的CPU周期也更少。

简单就好
简单数据类型的操作通常需要更少的CPU周期

尽量避免NULL
通常情况下最好指定列为NOT NULL,除非真的需要存储NULL值

MySQL可以为整数类型指定宽度,例如INT(11),对大多数应用这是没有意义的:它不会限制值的合法范围,只是规定了MySQL的一些交互工具用来显示字符的个数。对于存储和计算来说,INT(1)和INT(20)是相同的。
image

第5章 创建高性能的索引

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant