本文介绍了MySQL为什么要在InnoDB表中添加注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用phpMyAdmin或MySQL GUI工具时,每当我创建一个InnoDB表时,它都会向该表添加一个注释,如下所示:

When using phpMyAdmin or the MySQL GUI Tools, whenever I create an InnoDB table, it adds a comment to the table like this:

这是什么意思?它有什么用?

What does this mean? What's it used for?

推荐答案

InnoDB在每个文件中存储许多表.在该InnoDB数据文件中,可以有可用空间:

InnoDB stores many tables per file. Inside that InnoDB data file, there can be free space:

  • 放置表格或索引时,请删除行,或将行替换为较小的行(例如,较短的TEXT)
  • 文件一次增长 n MB(在my.cnf中配置)
  • When you drop a table or index, delete rows, or replace rows with smaller ones (e.g., shorter TEXT)
  • The file is grown n MB at a time (configured in my.cnf)

此评论仅告诉您InnoDB数据文件中有多少可用空间.当该值接近0时,InnoDB将扩展数据文件.

The comment is just telling you how much free space is in your InnoDB datafile(s). When that approaches 0, InnoDB will expand the data file.

我相信默认分配块是10MB,所以这可能就是为什么您有将近10MB可用空间的原因.

I believe the default allocation block is 10MB, so that's probably why you have almost 10MB free.

这篇关于MySQL为什么要在InnoDB表中添加注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 00:58