2、INSERT的优化
(1)尽量使用多个值表的 INSERT 语句,这种方式将大大缩减客户端与数据库之间的连接、关闭等消耗。...;
受影响的行: 1
时间: 0.008s
[SQL]
insert into user values(5,'test',replace(uuid(),'-',''));
受影响的行: 1
时间: 0.008s...replace(uuid(),'-','')),
(15,'test',replace(uuid(),'-','')),
(16,'test',replace(uuid(),'-',''));
受影响的行...,必须每个条件列都使独立索引,而不是复合索引(多列索引),才能保证使用到查询的时候使用到索引。...------------+----------+--------+------+------------+---------+---------------+
4 rows in set
测试一:OR连接两个有单独索引的字段