为什么是600多万?因为本来想整5000万来着,然后等了半天才600多万,不想等了,应该也够了。 具体就是: 1、分页查询 2、使用线程池、异步任务并发处理每批次的数据 3、写入到多个sheet(因为每个sheet 上限100万左右,就没有合并)(当然也可以写入到多个Excel然后合并为一个Excel,思路大差不差的) DELIMITER $$ CREATE PROCEDURE generate_test_data() BEGIN DECLARE i INT DEFAULT 1; DECLARE n INT DEFAULT 50000000; # 生成多少条数据 DECLARE randnum INT; DROP TABLE IF EXISTS test_table; CREATE TABLE test_table ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), email VARCHAR(255), age INT, address VARCHAR(255) ); WHILE i <= n DO SET...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Import Com.lfsun.model.entity.
Contact Import Com.lfsun.model.entity., search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack