摘要: 1.删除字段非空属性 alter table xxx alter column xxx drop not null 2.添加字段飞空属性 alter table xxx alter column xxx set not null 3.添加一个新字段 alter table xxx add colum 阅读全文
posted @ 2019-05-21 09:30 timeismoney 阅读(118) 评论(0) 推荐(0)
  2019年7月3日
摘要: 做MySQL优化,我们要善用 EXPLAIN 查看SQL执行计划。 下面来个简单的示例,标注(1,2,3,4,5)我们要重点关注的数据 type列,连接类型。一个好的sql语句至少要达到range级别。杜绝出现all级别 key列,使用到的索引名。如果没有选择索引,值是NULL。可以采取强制索引方 阅读全文
posted @ 2019-07-03 10:09 timeismoney 阅读(191) 评论(0) 推荐(0)