innodb_file_per_table
来源:互联网 发布:长大的好处 知乎 编辑:程序博客网 时间:2024/06/05 15:14
该参数设置为on时,每张表都建一个ibd文件,否则合用ibdata1
首先看为off的情况
mysql> show global variables like 'innodb_file_per_table';+-----------------------+-------+| Variable_name | Value |+-----------------------+-------+| innodb_file_per_table | OFF |+-----------------------+-------+1 row in set (0.01 sec)mysql> create database pt;Query OK, 1 row affected (0.00 sec)mysql> use pt;Database changedmysql> create table emp as select * from test.emp;Query OK, 14 rows affected (0.16 sec)Records: 14 Duplicates: 0 Warnings: 0mysql> create table dept as select * from test.dept;Query OK, 4 rows affected (0.05 sec)Records: 4 Duplicates: 0 Warnings: 0mysql> system ls /data/mysql/user_3306/data/pt/ -ls总用量 28 4 -rw-rw----. 1 mysql mysql 59 3月 9 12:49 db.opt12 -rw-rw----. 1 mysql mysql 8624 3月 9 12:49 dept.frm12 -rw-rw----. 1 mysql mysql 8780 3月 9 12:49 emp.frmmysql> exit
下面来看参数改为on的情况
mysql> show global variables like 'innodb_file_per_table';+-----------------------+-------+| Variable_name | Value |+-----------------------+-------+| innodb_file_per_table | ON |+-----------------------+-------+1 row in set (0.00 sec)mysql> system cat /etc/my.cnf | grep innodb_file_per_tableinnodb_file_per_table = 1mysql> mysql> drop database pt;Query OK, 2 rows affected (0.10 sec)mysql> create database pt;Query OK, 1 row affected (0.00 sec)mysql> use ptDatabase changedmysql> create table emp as select * from test.emp;Query OK, 14 rows affected (0.02 sec)Records: 14 Duplicates: 0 Warnings: 0mysql> create table dept as select * from test.dept;Query OK, 4 rows affected (0.04 sec)Records: 4 Duplicates: 0 Warnings: 0mysql> system ls /data/mysql/user_3306/data/pt/ -ls总用量 284 4 -rw-rw----. 1 mysql mysql 59 3月 9 12:51 db.opt 12 -rw-rw----. 1 mysql mysql 8624 3月 9 12:51 dept.frm128 -rw-rw----. 1 mysql mysql 98304 3月 9 12:51 dept.ibd 12 -rw-rw----. 1 mysql mysql 8780 3月 9 12:51 emp.frm128 -rw-rw----. 1 mysql mysql 98304 3月 9 12:51 emp.ibd
可以看到多了文件dept.ibd与emp.ibd
0 0
- innodb_file_per_table
- Differences Between innodb_data_file_path and innodb_file_per_table
- MySQL 参数浅析之 innodb_file_per_table
- 关于innodb_file_per_table的一些理解
- InnoDB 引擎独立表空间 innodb_file_per_table
- MySQL 不停服务来启用 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- Recover after DROP TABLE, innodb_file_per_table is OFF
- Recover after DROP TABLE, innodb_file_per_table is ON
- Recover after DROP TABLE, innodb_file_per_table is OFF
- Recover after DROP TABLE, innodb_file_per_table is ON
- InnoDB 引擎独立表空间 innodb_file_per_table
- InnoDB 引擎独立表空间 innodb_file_per_table
- 迷茫,是因为活在别人眼里
- MRtmpLib:rtmp客户端协议实现之总结(六)
- 顺时针遍历数组
- ubuntu下的Samba配置:使每个用户可以用自己的用户名和密码登录自己的home目录
- 高精度之乘法
- innodb_file_per_table
- CUDA学习网址推荐
- HBase 系统架构
- LeetCode: Validate Binary Search Tree
- ios的Provider(服务器)证书使用APNs的证书的生成过程
- LocalActivityManager的内部机制
- 驾校综合管理系统--网络版
- java中的hasCode与equals理解(转载)
- 作为一个程序员的感想