Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 842039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:53:46+00:00 2026-05-15T05:53:46+00:00

I am importing a 2.5gb csv file to a mysql table. My storage engine

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:53:47+00:00Added an answer on May 15, 2026 at 5:53 am

    Probably because it’s an I/O bound process. That means that the slowest part of the process is reading the CSV file from the disk and writing the MySQL database back to the disk. Disk access is much slower than pretty much anything else that goes on inside the computer, so your CPU probably only needs a few percent usage to keep up with it.

    Also, MySQL is copying the data in a piece at a time, not all at once, so it only needs to store a little bit at a time in RAM. That’s why it might not be using a whole lot of memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am importing approx 350,000 lines from a CSV file into MySQL using PHP
I'm importing a .CSV into an application with the following: if (($handle = fopen($file,
When importing a CSV file into Excel, it only strips the double-quotes from the
I am importing data from a CSV file using fgetcsv(), which yields an array
I am importing data from a flat file into a normalized table structure. I
I have a problem importing a CSV file with RapidMiner. Floating point values are
When importing numbers from a csv file, I need to convert them to floats
I'm importing some data from a CSV file, and numbers that are larger than
Im importing a csv to my sql server table using the following code SqlCommand
I am importing data from csv file so I used that code <?php $path

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.