简体   繁体   中英

importing table with phpmyadmin takes too long time

i've imported a mysql table stored in a .sql file using my localhost phpymadmin, the table has 14000 records (simple data, 5 fields only) and it took almost 10 minutes. is this normal? i'm running a laptop with win8, core i7 quad and my xampp seems to be configured properly. thanks

Your hard drive is the limit in this case. Having a single insert per row means your inserting is limited on your hard drives IOPS (I/O operations per second).

Bulk inserting reduces the IOPS but increases the MB/s transfer which is what you want in this case.

so rewriting like

INSERT INTO table VALUES (1,2,3,4),(1,2,3,4) 

with comma separated rows will give a huge boost

Putting in a hard drive with higher IOPS will speed it up also if the rewritten query is still slow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM