I
I
Ivan Ivanov2018-08-11 16:23:11
MySQL
Ivan Ivanov, 2018-08-11 16:23:11

How to make mysqldump create indexes after data is loaded?

The goal is to move a huge database (mysql innodb (1-2 hundreds of gigabytes)) to a new server.
Since on the old mysql 5.6 server, and on the new MariaDB, it will not work to use percona xtraBacup, as far as I understand. Therefore, I think you can try using mysqldump
When mysqldump creates a dump of a table, it first creates instructions for creating a table structure with indexes, and then for inserting data. Can the order be changed to:
Create table structure without indexes,
Insert data,
Create indexes?
If you create tables with data, and then put down indexes, it will be much faster, especially on large data. In the manual I found a solution only for MyIsam, I did not find a solution for innoDB.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-08-11
@xpert13

I will disappoint you, but apparently this is not possible:
(c) https://dba.stackexchange.com/a/76590

D
Dimonchik, 2018-08-12
@dimonchik2013

if so, the method of envelopes is inno - maisam - backupshuhrymuhry - mayisam - inno is quite working
if, of course, you have enough patience with gigabytes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question