2014年2月27日

How to reclaim space in InnoDB when innodb_file_per_table is ON

摘要: Wheninnodb_file_per_tableisOFFand all data is going to be stored inibdatafiles. If you drop some tables of delete some data then there is no any other way to reclaim that unused disk space exceptdump/reloadmethod.WhenInnodb_file_per_tableisON, each table stores data and indexes in it’s owntablespace 阅读全文

posted @ 2014-02-27 23:55 Still water run deep 阅读(407) 评论(0) 推荐(0)

Bash script: report largest InnoDB files

摘要: The following script will report the largest InnoDB tables under the data directory: schema, table & length in bytes. The tables could be non-partitioned, in which case this is simply the size of the corresponding.ibdfile, or they can be partitioned, in which case the reported size is the sum of 阅读全文

posted @ 2014-02-27 23:45 Still water run deep 阅读(271) 评论(0) 推荐(0)

Reasons to use innodb_file_per_table

摘要: When working with InnoDB, you have two ways for managing the tablespace storage:Throw everything in one big file (optionally split).Have one file per table.I will discuss the advantages and disadvantages of the two options, and will strive to convince thatinnodb_file_per_tableis preferable.A single 阅读全文

posted @ 2014-02-27 23:41 Still water run deep 阅读(275) 评论(0) 推荐(0)

mysql共享表空间和独立表空间

摘要: innodb这种引擎,与MYISAM引擎的区别很大。特别是它的数据存储格式等.对于innodb的数据结构,首先要解决两个概念性的问题: 共享表空间以及独占表空间。什么是共享表空间和独占表空间共享表空间以及独占表空间都是针对数据的存储方式而言的。共享表空间: 某一个数据库的所有的表数据,索引文件全部放在一个文件中,默认这个共享表空间的文件路径在data目录下。 默认的文件名为:ibdata1 初始化为10M。独占表空间: 每一个表都将会生成以独立的文件方式来进行存储,每一个表都有一个.frm表描述文件,还有一个.ibd文件。 其中这个文件包括了单独一个表的数据内容以及索引内容,默认情况下它的存储 阅读全文

posted @ 2014-02-27 17:29 Still water run deep 阅读(463) 评论(0) 推荐(0)

How do I see what character set a database / table / column is in MySQL?

摘要: Q:How do I see what the character set that a MySQL database, table and column are in? Is there something likeSHOW CHARACTER SETFOR mydatabase;andSHOW CHARACTER SETFOR mydatabase.mytable;andSHOW CHARACTER SETFOR mydatabase.mytable.mycolumn;A:How do I see what the character set that a MySQL database, 阅读全文

posted @ 2014-02-27 00:46 Still water run deep 阅读(176) 评论(0) 推荐(0)

导航