What does size limit on MySQL index mean?

前端 未结 2 626
野趣味
野趣味 2021-01-16 04:28

I have a table created like so:

CREATE TABLE `my_table` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`info` varchar(50) DEFAULT NULL,
`some_more_info` sm         


        
2条回答
  •  忘掉有多难
    2021-01-16 05:19

    Yes. The entire description about the index length can be found here: http://dev.mysql.com/doc/refman/5.0/en/create-index.html

    Prefix lengths are given in characters for nonbinary string types and in bytes for binary string types. That is, index entries consist of the first length characters of each column value for CHAR, VARCHAR, and TEXT columns, and the first length bytes of each column value for BINARY, VARBINARY, and BLOB columns.

    Also you create query has/had some extra ,'s.

提交回复
热议问题