How can I optimize the import of this dataset in mysql?

Posted by GeoffreyF67 on Stack Overflow See other posts from Stack Overflow or by GeoffreyF67
Published on 2010-04-26T21:07:23Z Indexed on 2010/04/26 21:13 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

I've got the following table schema:

CREATE TABLE `alexa` (
  `id` int(10) unsigned NOT NULL,
  `rank` int(10) unsigned NOT NULL,
  `domain` varchar(63) NOT NULL,
  `domainStatus` varchar(6) DEFAULT NULL,
  PRIMARY KEY (`rank`),
  KEY `domain` (`domain`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

It takes several minutes to import the data. To me that seems rather slow as we're only talking about a million rows of data.

What can I do to optimize the insert of this data? (already using disable keys)

G-Man

© Stack Overflow or respective owner

Related posts about mysql

Related posts about optimize