14.5.1 Creating InnoDB Tables
来源:互联网 发布:js encodeuri编码 编辑:程序博客网 时间:2024/05/22 15:41
14.5 InnoDB Table Management InnoDB 表管理14.5.1 Creating InnoDB Tables14.5.2 Moving or Copying InnoDB Tables to Another Machine14.5.3 Grouping DML Operations with Transactions14.5.4 Converting Tables from MyISAM to InnoDB14.5.5 AUTO_INCREMENT Handling in InnoDB14.5.6 InnoDB and FOREIGN KEY Constraints14.5.7 Limits on InnoDB Tables14.5.1 Creating InnoDB Tables创建一个InnoDB 表, 使用CREATE TABLE 语句。你不需要指定ENGINE=InnoDB子句 如果InnoDB 是定义为默认的存储引擎,MySQL 5.5默认是InnoDB. 你仍旧可以使用ENGINE=InnoDB 子句如果你计划使用mysqldump 或者负载来复制 CREATE TABLE 语句在server上 ,此server不是innodb作为默认引擎。-- Default storage engine = InnoDB.CREATE TABLE t1 (a INT, b CHAR (20), PRIMARY KEY (a));-- Backward-compatible with older MySQL.CREATE TABLE t2 (a INT, b CHAR (20), PRIMARY KEY (a)) ENGINE=InnoDB;一个InnoDB 表和它的indexes 可以创建在系统表空间或者 在一个file-per-table tablespace.当 innodb_file_per_table问及被启用, 在MySQL 5.6.6 里是默认设置,一个InnoDB 表是隐式的创建的 在一个单独的 file-per-table tablespace.相反,当innodb_file_per_table 被禁言,一个InnoDB 表是隐式的创建在system 表空间。当你创建一个MySQL Innodb 表, MySQL创建一个.frm 文件在数据库目录在MySQL 数据目录。对于表创建在 file-per-table tablespace,一个.ibd 文件也会被创建. 一个表创建在system 表空间是被创建在存在的system表空间ibdata files.在内部,InnoDB 增加一个entry 对于每个表到InnoDB 数据目录。entry 包括数据库名字。比如, 如果表t1 是创建在test数据库,数据字典条目是"test/t1".这意味着 你可以创建一个相同的表在不同的数据库Viewing the Properties of InnoDB TablesTo view the properties of InnoDB tables, issue a SHOW TABLE STATUS statement:mysql> SHOW TABLE STATUS FROM test LIKE 't%' \G;*************************** 1. row *************************** Name: t1 Engine: InnoDB Version: 10 Row_format: Compact Rows: 0 Avg_row_length: 0 Data_length: 16384Max_data_length: 0 Index_length: 0 Data_free: 0 Auto_increment: NULL Create_time: 2015-03-16 16:26:52 Update_time: NULL Check_time: NULL Collation: latin1_swedish_ci Checksum: NULL Create_options: Comment: 1 row in set (0.00 secmysql> SHOW TABLE STATUS FROM zjzc LIKE '%ClientActionTrack%' \G;*************************** 1. row *************************** Name: ClientActionTrack Engine: InnoDB Version: 10 Row_format: Compact Rows: 259238 Avg_row_length: 620 Data_length: 160907264Max_data_length: 0 Index_length: 0 Data_free: 145752064 Auto_increment: 302754 Create_time: NULL Update_time: NULL Check_time: NULL Collation: utf8_general_ci Checksum: NULL Create_options: partitioned Comment: 用户访问记录表1 row in set (0.01 sec)ERROR: No query specified在状态输出懒,你看到表t1的Row格式属性是compact.
0 0
- 14.5.1 Creating InnoDB Tables
- 14.6.1 Creating InnoDB Tables 创建InnoDB 表:
- 14.8.1 Creating InnoDB Tables 创建InnoDB 表
- 14.5.7 Limits on InnoDB Tables InnoDB 表的限制
- Creating tables with PDFBox
- Creating tables accelerator keys
- 8.5.1 Optimizing Storage Layout for InnoDB Tables
- 8.5.1 Optimizing Storage Layout for InnoDB Tables InnoDB表的存储布局优化
- InnoDB 中文参考手册 --- InnoDB Tables 概述
- innodb tables doesn't exist?
- Creating Data Tables and Populating Them
- Creating and Using Temporary Tables in Oracle
- 13.2.15. Restrictions on InnoDB Tables
- 14.6.7?Limits on InnoDB Tables InnoDB 表的限制
- Dropping and creating tables in read only tablespaces?!
- How Logs Work On MySQL With InnoDB Tables
- How Logs Work On MySQL With InnoDB Tables
- 14.2.6.1 Role of the .frm File for InnoDB Tables
- C# JSON字符串序列化与反序列化
- UI_搜索框UISearchController的使用(iOS8.0以后替代UISearchBar + UISearchDisplayController)
- Python配置第三方库Numpy和matplotlib的曲折之路
- Xcode调试UI
- 大数java来一波
- 14.5.1 Creating InnoDB Tables
- activiti中的流程变量
- shell 下数值、字符串比较
- eclipse出现乱码的情况
- <6>Android HAL 架构分析之硬件抽象层 hardware.h haraware.c sensors.c
- iOS进程间通信之CFMessagePort
- HTML5 实现橡皮擦的擦除效果
- 跑马灯实现(转载)
- 关于hibernate持久化所造成的问题以及解决方案