List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 19 1999 9:13pm
Subject:load data infile and indexes [was Re: Indexes]
View as plain text  
>>>>> "James" == James Manning <jmm@stripped> writes:

James> [ Sunday, September 19, 1999 ] Bob Kline wrote:
>> On Sun, 19 Sep 1999, Bill Koob wrote:
>> > Just curious I created an index using ALTER
>> > on a single 10 character field - it took
>> > 6 1/2 hours on a 800Meg table with 10+ million
>> > records. 100 Pentium.  All seems to work
>> > very well (just very slow). 
>> > 
>> > Qestion: Would it have saved a significant
>> > amount of time had I created the index at
>> > the time I created the table and before
>> > loading the data?
>> 
>> Usually it's even slower to create the index first and then load the
>> data.

James> I think it almost *has* to be slower, as you'll be dynamically
James> updating the index on every insert/update (I believe).

James> It'd be interesting to find out if LOAD DATA INFILE is "smart"
James> enough not to mess with the index until the file is done loading...
James> that'd certainly help do massive-updates (like from the Apache
James> log in another thread alive right now) and not get killed too badly
James> with indexes in place...

LOAD DATA INFILE is not yet that smart.  We will however in the real
near future integrate myisamchk into MySQL 3.23 and then we will fix
LOAD DATA INFILE to add indexes in a separate stage.

James> Is this how LOAD DATA INFILE works? or not?  In either case, could
James> section 7.15 of the manual include this behavior?  It'd certainly
James> be good to know :)

Regards,
Monty
Thread
Linux helpScott Mackie15 Sep
  • Re: Linux helpThimble Smith15 Sep
  • select problem on 3.22.21 killing serverjim kraai15 Sep
    • select problem on 3.22.21 killing serverMichael Widenius18 Sep
  • Re: select problem on 3.22.21 killing serverjim kraai18 Sep
    • Re: select problem on 3.22.21 killing serverMichael Widenius19 Sep
      • IndexesBill Koob19 Sep
        • Re: IndexesPaul DuBois19 Sep
        • Re: IndexesBob Kline19 Sep
          • load data infile and indexes [was Re: Indexes]James Manning20 Sep
            • load data infile and indexes [was Re: Indexes]Michael Widenius20 Sep
        • IndexesMichael Widenius19 Sep