news表比较大 对id 进行 操作
ALTER TABLE news PARTITION BY RANGE(id)
(
PARTITION p0 VALUES LESS THAN (50000),
PARTITION p1 VALUES LESS THAN (100000),
PARTITION p2 VALUES LESS THAN (150000),
PARTITION p3 VALUES LESS THAN (200000),
PARTITION p4 VALUES LESS THAN (250000),
PARTITION p5 VALUES LESS THAN (300000),
PARTITION p6 VALUES LESS THAN (350000),
PARTITION p_catch_all VALUES LESS THAN MAXVALUE
)
将查询的结果导到mem_xx表
CREATE TABLE IF NOT EXISTS mem_xx SELECT `htmlpath` FROM `hellohouse_news` WHERE isrec=0 and issign=1 and `htmlpath` !='';
本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/1225007