update xx join xx on xx%100=xx set xx=xx;
或者
update xx set xx=xx; 很多条一个是数据库求余运算,不能用索引
一个是多次update...哪个效率更好 

解决方案 »

  1.   

    数据库直接求余肯定是不好的
    一个一个update也是不好的这些我都知道,但是如果两者权衡取其轻,我该如何处理
      

  2.   

    建议举能说明问题的例子。你的例子让人眼花,到底XX是哪个XX?
      

  3.   

    貌似两条sql完全不相干  有什么可比性呢
      

  4.   

    比如id 1-100update table as t set t.level=10 where id%8=0;
    另一种写法
    update table as t set t.level=10 where id in(0,8,16,24...96);