数据库如何快速插入百万条数据

https://blog.csdn.net/ybw_2569/article/details/96463387

https://www.jb51.net/article/47607.htm

https://blog.csdn.net/huuinn/article/details/79691908

 

在内存中创建一个表

CREATE TABLE `vote_record_memory` (
`id` INT (11) NOT NULL AUTO_INCREMENT,
`user_id` VARCHAR (20) NOT NULL,
`vote_id` INT (11) NOT NULL,
`group_id` INT (11) NOT NULL,
`create_time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_id` (`user_id`) USING HASH
) ENGINE = MEMORY AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8;

MEMORY:表示表创建在内存中

posted @ 2019-11-25 12:18  cuiqq  阅读(713)  评论(0编辑  收藏  举报