>>>>> "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
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 :)