InnoDB Chinese Reference manual---InnoDB table limitations

Source: Internet
Author: User
Tags count create index manual mysql reference
Reference | Reference Manual | Chinese InnoDB chinese Reference Manual---canine (heart-sail) InnoDB table is limited to the < 3.23.50 version of InnoDB, you cannot use ALTER TABLE or CREATE INDEX to modify an already A table with a FOREIGN key constraint or a FOREIGN KEY constraint is referenced. Use DROP table and CREATE table to replace it. You cannot convert a MySQL system table (such as ' user ' or ' host ') to a InnoDB type. System tables must always be of type MyISAM. The InnoDB table does not support Full-text searching (fulltext search). MySQL performs replication in autocommit mode (autocommit mode) (replication). So the consistent reads in slave may seem to be part of the transaction you've been dealing with, so this read (read) is not really consistent in slave. This restriction no longer exists in 3.23.52. InnoDB does not save the total number of table records internally, which is a bit complicated because of the multiversioning reason. In response to a query SELECT COUNT (*) from T, InnoDB had to scan an index of the table, which would take some time if the table was not fully in the buffer pool. To get a faster count you have to use your own to create a counting table that allows your application to update itself when inserting and deleting it. One way to eliminate bottlenecks caused by lock waiting is to create a whole set of counters. The application can randomly select one at a time. To get the count, just sum the counter: SELECT sum (counter_column) from your_counter_table. The Auto-increment column in the table must have a key defined for it, and the key must contain only this auto-increment column. InnoDB does not support the use of auto_increment= in a CREATE TABLE statement .... This clause is intended to set the first value for a auto-increment column (the default first value is 1). Workspace (workaround): Inserts a specified value into the self-added column as the first value. From this point on, the InnoDB will begin to increase from this value. Show Table STATUS does not give precise statistics on the InnoDB table except the physical size retained by the table. The number of rows recorded can only be done by an optimized SQL to get a rough estimate. In MySQL replication (replication), the load table from master still cannot work in the InnoDB table. A workspace (workaround) is opened in the primary (master) server to convert the table to a MyISAM type, then load, and then change the table back to the InnoDB type in master. If you are indexing in the previous section of a column:
CREATE TABLE T (a CHAR (a), B INT, INDEX T_ind (A (5)) TYPE = InnoDB;
InnoDB will inherently create an index on the entire column, rather than just the first part of the set. The InnoDB table does not support INSERT delayed. The lock tables operation for MySQL does not know that an SQL statement has completed a row lock on InnoDB: This means that even if another user's transaction has a row lock set on the same table, you will still lock the table. So your actions on this table have to wait for a lock conflict with another user. Likewise a deadlock is possible. In any case, this can be transactional integrity (transaction integrity) is not dangerous because InnoDB set row-level locking usually takes care of integrity (integrity). Similarly, a table-level lock can prevent other transactions from getting more row-level locks on the table (the locking pattern is inconsistent). Index cannot be set on a BLOB or TEXT field. A table may not have more than 1000 fields. Delete from table no longer rebuilds the table, one after the other, except to delete all the record rows, which is not so fast. TRUNCATE can be used in future versions of MySQL, which is pretty quick. In the InnoDB of <= 3.23.43, the drop table must be called to remove the InnoDB table of an individual before the drop DATABASE is invoked on the InnoDB table. This restriction no longer exists in the version of >= 3.23.44. InnoDB The default database page size is KB. The source code can be set to 8 KB to KB by recompiling. You must update univ_page_size and Univ_page_size_shift in the UNIV.I. In version <= 3.23.39a InnoDB, the maximum record line length is slightly smaller than half the length of the database page. Release version 3.23.39b from source (but still not in the Mysql-max 3.23.402 release version), the BLOB and TEXT fields allow < 4 GB, and the entire row length is equally < 4 GB. InnoDB <= 128 bytes fields are not stored in separate pages. After InnoDB modifies a record by storing a long field on a separate page, the remaining record line length must be less than half the database page. The maximum key length is bytes. The total size of the log file must be < 4 GB. The maximum table space size is 4 billion (billion) times the database page. This is alsoThe maximum size of a table. The minimum table space is ten MB.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.