0

任何人都知道为什么 InnoDB 中的 information_schema.tables.data_free 总是 8388608,无论表中有多少行;

table_schema    table_name  table_rows  data_free   engine

g33v1       appraise    0       8388608     InnoDB

g33v1       areatype    12403       8388608     InnoDB

g33v1       atype       581982      8388608     InnoDB

g33v1       atype2      579700      8388608     InnoDB

谢谢。

4

1 回答 1

0

我认为这是为进行排序和其他需要硬盘空间的事情分配的临时表最大大小。因为在其他情况下也会出现同样的情况

mysql> show global variables like '%tmp%';
+----------------+-----------------------+
| Variable_name  | Value                 |
+----------------+-----------------------+
| bdb_tmpdir     | /usr/local/mysql/tmp/ |
| max_tmp_tables | 32                    |
| tmp_table_size | 8388608               |
| tmpdir         | /usr/local/mysql/tmp  |
+----------------+-----------------------+

mysql> show global variables like '%myisam%';
+---------------------------------+---------------+
| Variable_name                   | Value         |
+---------------------------------+---------------+
| myisam_data_pointer_size        | 4             |
| myisam_max_extra_sort_file_size | 2147483648    |
| myisam_max_sort_file_size       | 2147483647    |
| myisam_recover_options          | OFF           |
| myisam_repair_threads           | 1             |
| myisam_sort_buffer_size         | 4194304       |
| myisam_stats_method             | nulls_unequal |
+---------------------------------+---------------
于 2013-02-26T05:21:50.427 回答