- OS: Windows10 x64
- HDD: 1TB
- RAM: 8GB
- CPU: Intel Core i5-4460
- PostgreSQL: 9.6
I want to import almost 37GB data from MySQL into PostgreSQL, and the data is sql file, which full of INSERT INTO tbl_1 VALUES(x, x, x);
statements.
I'm using \i data.sql
to import it, but after 15 hours work, the PostgreSQL's data size is only 1GB. While during this 15 hours, there are no other tasks running, only the importing.
So, is there anyway i can do to speed up the procedure?
mysqldump
is willing to emit batch inserts; do they work in PostgreSQL? For MySQL it is a 10x speedup. Also, what happens with the indexes?"
around table name, I use sed tool to remove them. For indexes, i remove all indexes creation in schemas file, only left table creation.