msql相关
Joe_n
学无止境
展开
-
MySQL查询及删除重复记录的方法
(一) 1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1) 2、删除表中多余的重复记录,重复记录是根据单个字段(peo转载 2012-03-26 14:17:38 · 691 阅读 · 0 评论 -
MSQL数据库检索优化
MYSQL的优化是非常重要的.其他最常用也最需要优化的就是limit.mysql的limit给分页带来了极大的方便,但数据量一大的时候,limit的性能就急剧下降. 同样是取10条数据 select * from yanxue8_visit limit 10000,10 和 select * from yanxue8_visit limit 0,10 就不是一个数量级别的.原创 2012-03-28 14:28:41 · 1054 阅读 · 0 评论 -
MySQL查询及删除重复记录的方法
(一) 1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1) 2、删除表中多余的重复记录,重复记录是根据单个字段(peo转载 2012-03-28 14:30:52 · 530 阅读 · 0 评论