mysql -uroot -p -D -e "select **" > api_stat
ALTER TABLE tbl_name
DISABLE KEYS;
/usr/local/mysql/bin/mysqlimport --local -uroot -p test api_stat
or
mysql> load data infile '/tmp/api_stat' into table api_stat
ALTER TABLE tbl_name
ENABLE KEYS;
create index index_time on api_log (`time`);