python -c "for i in range(1, 1+1000000): print(i)" > base.txt

mysql> use test;
ERROR 1049 (42000): Unknown database 'test'
mysql> use test01;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------+
| Tables_in_test01 |
+------------------+
| t1 |
| tmp_table |
| ytt_pt1 |
+------------------+
3 rows in set (0.00 sec)

mysql> load data infile '/opt/base.txt' replace into table tmp_table;
Query OK, 1000000 rows affected (15.05 sec)
Records: 1000000 Deleted: 0 Skipped: 0 Warnings: 0

mysql>

https://zhuanlan.zhihu.com/p/74788180

相关文章:

  • 2021-07-04
  • 2021-05-30
  • 2022-12-23
  • 2021-05-02
  • 2022-12-23
  • 2021-10-23
  • 2021-11-26
  • 2021-12-12
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案