帝国cms手动分表

1)帝国后台分表管理,建立phome_ecms_news_data_2表
2)insert into  phome_ecms_news_data_2(id)   select id   from  phome_ecms_news_data_1 order by id desc  limit 30001,30000; //每3万条一个分表
3) update phome_ecms_news_data_2 a ,phome_ecms_news_data_1 b set a.classid=b.classid, a.keyid=b.keyid,a.dokey=b.dokey,a.newstempid=b.newstempid,a.closepl=b.closepl,a.haveaddfen=b.haveaddfen,a.infotags=b.infotags,a.writer=b.writer,a.befrom=b.befrom,a.newstext=b.newstext where a.id=b.id; // 更新 phome_ecms_news_data_2 的其它字段
4) update phome_ecms_news set stb =2 where id in (select id from phome_ecms_news_data_2); // 更新news表的stb字段
5) 要分更多表,依次类推

发表评论

邮箱地址不会被公开。 必填项已用*标注