mysql does not utilize my cpu and ram enough?
- by vick
Hello Everyone!
I am importing a 2.5gb csv file to a mysql table. My storage engine is innodb. Here is the script:
use xxx;
DROP TABLE IF EXISTS `xxx`.`xxx`;
CREATE TABLE `xxx`.`xxx` (
`xxx_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`yy` varchar(128) NOT NULL,
`yyy` varchar(64) NOT NULL,
`yyyy` varchar(2) NOT NULL,
`yyyyy` varchar(10) NOT NULL,
`url` varchar(64) NOT NULL,
`p` varchar(10) NOT NULL,
`pp` varchar(10) NOT NULL,
`category` varchar(256) NOT NULL,
`flag` varchar(4) NOT NULL,
PRIMARY KEY (`xxx_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
set autocommit = 0;
load data local infile '/home/xxx/raw.csv'
into table company
fields terminated by ',' optionally enclosed by '"'
lines terminated by '\r\n'
(
name,
yy,
yyy,
yyyy,
yyyyy,
url,
p,
pp,
category,
flag
);
commit;
Why does my PC (core i7 920 with 6gb ram) only consume 9% cpu power and 60% ram when running these queries?