List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:August 2 1999 3:40am
Subject:Re: insert into an indexed table
View as plain text  
>>>>> "Martin" == Martin Ramsch <m.ramsch@stripped> writes:

Martin> On Mo, 1999-07-26 05:47:12 -0700, Paul Salaberria wrote:
>> I have an indexed table with around 1 million rows. Using LOAD DATA INFILE 
>> the loading is taking around 30-45 minutes on my present server. The final 
>> version of the database will have 100 million rows, and needs to be 
>> re-populated once a week.
>> What is the fastest method of populating the table from a .csv file ?

Martin> You could drop the indexes before the inserts and the add them again.

Martin> This should speed up the inserts quite much, and adding the indexes
Martin> later on again should/could be faster than having them updated all the
Martin> time during the inserts.

Martin> Untested myself ... so I might be wrong.

You are right;  This is described in the MySQL manual!

insert into an indexed tablePaul Salaberria26 Jul
  • Re: insert into an indexed tableMartin Ramsch26 Jul
    • Re: insert into an indexed tableMichael Widenius2 Aug
      • Re: insert into an indexed tableChris J. DiBona2 Aug