R
R
Relapse2020-03-28 16:53:36
linux
Relapse, 2020-03-28 16:53:36

How to edit a huge SQL file?

Hello!

We plan to transfer the database from myisam to InnoDB by dumping the current tables and importing them with the InnoDB parameter instead of myisam.

The problem is compounded by the fact that we have a 50 GB table, and when editing a dump file with this table with the sed command, the approximate time to change the table type will be 25 hours, which is a very long time.

Are there other ways to solve this problem?
Method ALTER TABLE table_name ENGINE=InnoDB; it makes no sense to offer, it will take even more time.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Korotenko, 2020-03-28
@Relapse

Why not make 2 dumps
1. structure
2. data
There is an even more advanced way to use data synchronization utilities. They handle more complex cases.

T
ThunderCat, 2020-03-28
@ThunderCat

on the dock did not try?
UPD: https://serverfault.com/questions/51982/converting...
UPD2: emnip, it seems like all indexes and keys must be killed, then convert and create keys / indexes, which will seriously speed up the process.

M
mayton2019, 2020-03-28
@mayton2019

I am not a mysql expert. But in other DBMS, CTAS/alter table rename is sufficient for any type and storage geometry changes.
Sed is generally a bad ETL utility. Don't use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question