怎么理解MySQL中innodb_file_per_table参数
发布时间:2021-12-18 22:39:11 所属栏目:MySql教程 来源:互联网
导读:这篇文章将为大家详细讲解有关怎么理解MySQL中innodb_file_per_table参数,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。 在MySQL中创建表时,如果innodb_file_per_table为ON,则会生成两个文件tablename
这篇文章将为大家详细讲解有关怎么理解MySQL中innodb_file_per_table参数,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。 在MySQL中创建表时,如果innodb_file_per_table为ON,则会生成两个文件tablename.frm和tablename.ibd。 如果innodb_file_per_table为OFF时,则只会生成一个文件tablename.frm,此表的数据将存放在ibdata*这个文件中。 mysql> show variables like '%per_table%'; +---------------------------+-------+ | Variable_name | Value| +---------------------------+-------+ | innodb_file_per_table | ON | +---------------------------+-------+ mysql> use vast mysql> create table testtbs(a int,b int); mysql> insert into testtbs select 1,2; mysql> insert into testtbs select 3,4; [root@vast vast]# pwd /data/mydb/vast [root@vast vast]# ls *testtbs* testtbs.frm testtbs.ibd mysql> show variables like '%per_table%'; +---------------------------+-------+ | Variable_name | Value| +---------------------------+-------+ | innodb_file_per_table | OFF | +---------------------------+-------+ mysql> create table testtbs1(a int,b int); mysql> insert into testtbs1 select 1,2; mysql> insert into testtbs1 select 3,4; [root@vast vast]# pwd /data/mydb/vast [root@vast vast]# ls *testtbs1* testtbs1.frm 关于怎么理解MySQL中innodb_file_per_table参数就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。 (编辑:ASP站长) 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
相关内容
未处理完善
-
无相关信息
最新更新