主键乱序插入对Innodb性能的影响 在平时的mysql文档学习中我们经常会看到这么一句话: MySQL tries to leave space so that future inserts do not incur un-necessary page splits (and thus higher IO cost). In an "ideal" world, MySQL tries to keep the index pages at 15/16-th full, but depe…
在日常使用Entity Framework中,数据更新通常会用到.下面就简单封装了一个DBContext类 public partial class EFContext<T> : DbContext where T : class { public EFContext(): base("name=MyConnectionString") { } protected override void OnModelCreating(DbModelBuilder modelBuild…
select max(id) from test ; desc test ; insert into test (a,b,c) values ('abc','123-213','test'); REPAIR table test ; 小技巧: 选取其中一条,按执行,就可以只执行该条语句,不然每次都得删除之前的! 遇到的问题: id primeKey auto-increment 在插入新记录时,出现duplicatekey for PRIME KEY "28453"的错误. 查询最大…