我正在考虑一个问题。
在 C 语言中,我们建议 struct 的大小应该是 2 字节的倍数。
情商:
struct text{
int index;//assume int is 4 byte.
char [8] word;
}//alought text is only 12 bytes, compiler would assign 16 bytes for this struct
因此,我想知道 MySQL 的记录大小(感谢 Gordon Linoff)是否遇到同样的问题?
此外,如何通过控制表大小来优化 MySQL?