Maloc
Maloc

Reputation: 43

Does innodb_online_alter_log_max_size took memory from ram or Hard Disk

I got an Mysql (5.7) error while altering huge table (400 G) for adding an index:

ERROR 1799 (HY000): Creating index 'FTS_DOC_ID_INDEX' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again.

I guess that I had to increase innodb_online_alter_log_max_size but I'm afraid that it while took it from RAM cause it is already full enough.

N.B: I had enough space on tmpdir path.

Upvotes: 0

Views: 1896

Answers (1)

J_H
J_H

Reputation: 20450

It uses disk space, not RAM. But I recommend that you do the experiment. Use create table foo_small like foo, and then a WHERE clause with insert into foo_small select * from foo where ... so you have a conveniently small replica of the table of interest, significantly smaller than 400 GiB. Now practice the expensive "index add" operation, and verify that resource consumption is in line with your expectations, before doing the huge operation.

Upvotes: 1

Related Questions