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 8284823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:15:15+00:00 2026-06-08T11:15:15+00:00

I have a table like this CREATE TABLE IF NOT EXISTS `dnddata` ( `numbers`

  • 0

I have a table like this

CREATE TABLE IF NOT EXISTS `dnddata` (
  `numbers` varchar(10) NOT NULL,
  `opstype` char(1) NOT NULL,
  PRIMARY KEY (`numbers`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (numbers)
PARTITIONS 25 */;

i have to insert 300 million records. i am inserting 10 million records each time using load data in file from csv file.

To insert 10 million records taking nearly 5 min first time. Time is increasing each time gradually. after 30 million records it stops inserting and memory using 100% server not responding.

below my my.cnf file setting

bulk_insert_buffer_size = 100M
key_buffer = 100M
sort_buffer_size = 50M
read_buffer = 50M

i am using cpu with 2 G memory.

details for 30 million records

    Space usage
Type    Usage
Data    545.3   MiB
Index   694.8   MiB
Total   1,240.1 MiB

MySQL client version: 5.5.14

with out index it is inserting fine 10 million in 50 sec.

Please tell me what kind of setting need to change.

  • 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-06-08T11:15:16+00:00Added an answer on June 8, 2026 at 11:15 am

    Try:

    ALTER TABLE dnddata DISABLE KEYS;
    
    LOAD DATA INFILE...
    
    ALTER TABLE dnddata ENABLE KEYS;
    

    Also configure my.cnf as:

    key_buffer_size = 1G
    sort_buffer_size = 4M
    read_buffer_size = 1M
    read_rnd_buffer_size = 1M
    join_buffer_size = 2M
    bulk_insert_buffer_size = 32M
    myisam_sort_buffer_size = 256M
    

    restart MySQL server after modifying MySQL config file.

    formula below might help you configure parameters properly:

    key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections = K bytes of memory (< 2GB)
    

    do you really need numbers as varchar(10)? making it char(10) or int will help improve performance.

    creating PRIMARY KEY on a varchar column is overhead so you can drop it if its not needed.

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

Sidebar

Related Questions

I have a table like this: CREATE TABLE book_info ( book_id VARCHAR(32) not null,
I have something like this: create table account ( id int identity(1,1) primary key,
I have a database table that looks like this: CREATE TABLE IF NOT EXISTS
I have a mysql table like this (sql): CREATE TABLE IF NOT EXISTS silver_and_pgm
I have a table that looks like this CREATE TABLE IF NOT EXISTS `language`
I have a MySQL table like this CREATE TABLE IF NOT EXISTS `vals` (
I have a code like this c.execute('CREATE TABLE IF NOT EXISTS base (ID INTEGER
I have a table like this: CREATE TABLE IF NOT EXISTS `session` ( `id`
Say I have a table like so: CREATE TABLE big_table (UUID varchar(32) not null,
I have a MySQL table like this: CREATE TABLE IF NOT EXISTS `mytable` (

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.