What exactly happened to the indexing operation?

I indexed a huge table today containing 2 billion records. I thought MySQL would eat up my 2 TB disk ... Disk consumption increased to 400 GB and then 500 GB, and then finally dropped to 180 GB, and MySQL says it successfully added the index. Why is space expanding and what happens as a result? Can someone please give me some pointers?

+3
source share
1 answer

By the way, yesterday I answered the question about how to make index creation faster in MySQL , and the following came out of my research:

CREATE INDEX DROP INDEX , , . , . , , . .

:

+4

Source: https://habr.com/ru/post/1767728/


All Articles