国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

通過實例認識MySQL中前綴索引的用法

2020-01-18 22:56:32
字體:
來源:轉載
供稿:網友

今天在測試環境中加一個索引時候發現一警告

root@test 07:57:52>alter table article drop index ind_article_url;Query OK, 144384 rows affected (16.29 sec)Records: 144384 Duplicates: 0 Warnings: 0root@test 07:58:40>alter table article add index ind_article_url(url);Query OK, 144384 rows affected, 1 warning (19.52 sec)Records: 144384 Duplicates: 0 Warnings: 0root@test 07:59:23>show warnings;+―――+――+―――――――――――――――――――+| Level  | Code | Message                         |+―――+――+―――――――――――――――――――+| Warning | 1071 | Specified key was too long; max key length is 767 bytes |+―――+――+―――――――――――――――――――+1 row in set (0.00 sec)

用show create table article查看索引以及表結構的信息:

`URL` varchar(512) default NULL COMMENT ‘外鏈url',……KEY `ind_article_url` (`URL`(383))…..DEFAULT CHARSET=gbk……drop table test;create table test(test varchar(767) primary key)charset=latin5;

主站蜘蛛池模板: 南澳县| 林西县| 永善县| 城市| 灌阳县| 额济纳旗| 比如县| 民和| 宁南县| 元江| 会同县| 临沧市| 嘉禾县| 高安市| 全南县| 新巴尔虎左旗| 庆城县| 莱西市| 新晃| 东宁县| 保靖县| 佛冈县| 青海省| 安泽县| 金坛市| 莱阳市| 海南省| 丹棱县| 剑川县| 莒南县| 南康市| 高清| 夹江县| 资兴市| 萨嘎县| 中阳县| 翁牛特旗| 宁阳县| 游戏| 通化县| 深州市|