MySQL一个索引最多有多少个列?真实的测试例子

妈妈加油你行的

妈妈加油你行的

2016-02-19 09:59

今天图老师小编给大家介绍下MySQL一个索引最多有多少个列?真实的测试例子,平时喜欢MySQL一个索引最多有多少个列?真实的测试例子的朋友赶紧收藏起来吧!记得点赞哦~
最多16列。

create table test (
f1 int,
f2 int,
f3 int,
f4 int,
f5 int,
f6 int,
f7 int,
f8 int,
f9 int,
f10 int,
f11 int,
f12 int,
f13 int,
f14 int,
f15 int,
f16 int,
f17 int
);

create index idx_test_16 on test (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16);
create index idx_test_17 on test (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17);

运行结果如下:


mysql create table test (
- f1 int,
- f2 int,
- f3 int,
- f4 int,
- f5 int,
- f6 int,
- f7 int,
- f8 int,
- f9 int,
- f10 int,
- f11 int,
- f12 int,
- f13 int,
- f14 int,
- f15 int,
- f16 int,
- f17 int
- );
Query OK, 0 rows affected (0.06 sec)

mysql
mysql create index idx_test_16 on test (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16);
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql create index idx_test_17 on test (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17);
ERROR 1070 (42000): Too many key parts specified; max 16 parts allowed
mysql
展开更多 50%)
分享

猜你喜欢

MySQL一个索引最多有多少个列?真实的测试例子

编程语言 网络编程
MySQL一个索引最多有多少个列?真实的测试例子

酷盘每一个共享文件夹组最多可以容纳多少个成员

电脑网络
酷盘每一个共享文件夹组最多可以容纳多少个成员

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

如何知道一个工作簿中有多少个工作表?

电脑入门
如何知道一个工作簿中有多少个工作表?

QQ相册里最多可以创建多少个相册?

电脑入门
QQ相册里最多可以创建多少个相册?

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

从一个MySQL的例子来学习查询语句

MySQL mysql数据库
从一个MySQL的例子来学习查询语句

利用SQL找出一个月中有多少个周日

编程语言 网络编程
利用SQL找出一个月中有多少个周日

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

SQL Server数据库管理员(DBA)的工作内容

SQL Server数据库管理员(DBA)的工作内容

用js实现CSS圆角生成更新

用js实现CSS圆角生成更新
下拉加载更多内容 ↓