A
A
Alter_Ego2012-08-15 16:13:30
MySQL
Alter_Ego, 2012-08-15 16:13:30

LOAD DATA INFILE, are indexes updated?

There is a need to regularly upload a lot of data to the Mysql table very quickly (hundreds of thousands of records in a few seconds). I use the LOAD DATA INFILE construct for this .
Who knows if the InnoDB index of the table is rebuilt after adding data in this way? In the manual, I only found an indication of rebuilding indexes when filling in an empty MyISAM table, but this is not my case.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zuborg, 2012-08-15
@zuborg

Of course, they are rebuilt if they are active (alter table ... disable keys were not used).
Another question is that their update takes resources, and if for “very fast” indexes are turned off and then turned back on, this will entail a complete rebuild of the indexes, which can be stressful if there was a lot of data, and relatively little was added.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question