check the manual. You have to change some columns to TEXT or BLOBs 

Reducing the column length to 65,533 or less permits the statement to succeed. 

mysql> CREATE TABLE t2 (c1 VARCHAR(65533) NOT NULL) ENGINE = InnoDB CHARACTER SET latin1; Query OK, 0 rows affected (0.01 sec) 

•For MyISAM  tables, NULL  columns require additional space in the row to record whether their values are NULL . Each NULL  column takes one bit extra, rounded up to the nearest byte. 

The statement to create table t3  fails because MyISAM  requires space for NULL  columns in addition to the space required for variable-length column length bytes, causing the row size to exceed 65,535 bytes: 

mysql> CREATE TABLE t3 (c1 VARCHAR(32765) NULL, c2 VARCHAR(32766) NULL) ENGINE = MyISAM CHARACTER SET latin1; 

ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs 

For information about InnoDB NULL  column storage, see Section 15.10, “InnoDB Row Formats” . 

• InnoDB  restricts row size (for data stored locally within the database page) to slightly less than half a database page for 4KB, 8KB, 16KB, and 32KB innodb_page_size  settings, and to slightly less than 16KB for 64KB pages. 

The statement to create table t4  fails because the defined columns exceed the row size limit for a 16KB InnoDB  page. 

mysql> CREATE TABLE t4 ( c1 CHAR(255),c2 CHAR(255),c3 CHAR(255), c4 CHAR(255),c5 CHAR(255),c6 CHAR(255), c7 CHAR(255),c8 CHAR(255),c9 CHAR(255), c10 CHAR(255),c11 CHAR(255),c12 CHAR(255), c13 CHAR(255),c14 CHAR(255),c15 CHAR(255), c16 CHAR(255),c17 CHAR(255),c18 CHAR(255), c19 CHAR(255),c20 CHAR(255),c21 CHAR(255), c22 CHAR(255),c23 CHAR(255),c24 CHAR(255), c25 CHAR(255),c26 CHAR(255),c27 CHAR(255), c28 CHAR(255),c29 CHAR(255),c30 CHAR(255), c31 CHAR(255),c32 CHAR(255),c33 CHAR(255) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARSET latin1; 

ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. 

## 8.5 Optimizing for InnoDB Tables 

InnoDB  is the storage engine that MySQL customers typically use in production databases where reliability and concurrency are important. InnoDB  is the default storage engine in MySQL. This section explains how to optimize database operations for InnoDB  tables. 

## 8.5.1 Optimizing Storage Layout for InnoDB Tables 

•Once your data reaches a stable size, or a growing table has increased by tens or some hundreds of megabytes, consider using the OPTIMIZE TABLE  statement to reorganize the table and compact any wasted space. The reorganized tables require less disk I/O to perform full table scans. This is a straightforward technique that can improve performance when other techniques such as improving index usage or tuning application code are not practical. 

