Any faster building primary/unique indexes after Load Data Infile?

2010-02-21 Thread mos
I am loading 35 million rows of data into an empty MyISAM table. This table has 1 primary key (AutoInc) and 1 unique index and 2 non-unique indexes. Is it going to be any faster if I remove the indexes from the table before loading the data, load the data, then do an Alter Table .. add index ..

Re: Any faster building primary/unique indexes after Load Data Infile?

2010-02-21 Thread Carsten Pedersen
Generally, you should find that removing and re-adding the indexes will speed up your operation. I do not believe that ALTER TABLE with just index additions will require a table rebuild, but even if it does, doing a table copy will be a fairly fast operation (much faster than loading from othe

Re: Any faster building primary/unique indexes after Load Data Infile?

2010-02-25 Thread Baron Schwartz
Hi, On Sun, Feb 21, 2010 at 1:42 PM, mos wrote: > I am loading 35 million rows of data into an empty MyISAM table. This table > has 1 primary key (AutoInc) and 1 unique index and 2 non-unique indexes. > > Is it going to be any faster if I remove the indexes from the table before > loading the dat

Re: Any faster building primary/unique indexes after Load Data Infile?

2010-02-25 Thread Ananda Kumar
Then before loading alter table table_name disable keys; load data alter table table enable keys; This will enable faster data load and faster index rebuild. regards anandkl On Fri, Feb 26, 2010 at 8:03 AM, Baron Schwartz wrote: > Hi, > > On Sun, Feb 21, 2010 at 1:42 PM, mos wrote: > > I am