笔记——快速创建百万级容量表

create table order_history(
id int PRIMARY key auto_increment,
type int,
score int,
name VARCHAR(255),
phone VARCHAR(255)
)


insert into order_history(type,score,name,phone) select type,score,name,phone from order_history;

UPDATE order_history SET name = CONCAT('test_',id), phone = 13000000000+id,score = RAND()*100,type = RAND()*5;

 

你可能感兴趣的:(笔记)