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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:50:18+00:00 2026-06-05T02:50:18+00:00

The current way I am loading the file is: load data local infile ‘file_name’

  • 0

The current way I am loading the file is:

   load data local infile 'file_name' into table tableA  
fields terminated by ',' enclosed by '"' lines terminated by '\n';

Is the optimal way to load in a table in a unix machine. Does it create the optimal table size? I want a table that takes up the smallest space.

  • 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-05T02:50:21+00:00Added an answer on June 5, 2026 at 2:50 am

    MyISAM

    If the table is MyISAM, you should do the following:

    set bulk_insert_buffer_size = 1024 * 1024 * 256;
    alter table tableA disable keys;
    load data local infile 'file_name' into table tableA  
    fields terminated by ',' enclosed by '"' lines terminated by '\n';
    alter table tableA enable keys;
    

    InnoDB

    If the table is InnoDB, you should do the following:

    set bulk_insert_buffer_size = 1024 * 1024 * 256;
    load data local infile 'file_name' into table tableA  
    fields terminated by ',' enclosed by '"' lines terminated by '\n';
    

    No only will this take up the least space (loading an empty table), but the rows will be buffered in a treelike structure in memory based on the bulk_insert_buffer_size for caching the data quicker during the reload.

    If you are worried about ibdata1 exploding, you need to convert all InnoDB tables to use innodb_file_per_table. Please use my InnoDB Cleanup Steps : Howto: Clean a mysql InnoDB storage engine?

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

Sidebar

Related Questions

I would like to verify my Core Data store (SQLite file) before loading it
I load a JavaScript file which takes current page's URL as a parameter. Here
What is the easiest way to save and load data in python, preferably in
After discovering on superuser that there is no current way to add syntax highlighting
Is there a way to display current weather conditions for the recipient of an
Is there a way to identify the current version of IIS / using NSIS
Whats the best way to get the current time (HH:MM:SS) using Objective-C. I would
Is there a better way extract the current revision hash in Mercurial than hg
Is there a way to get the current content of a WebView? What about
Is there a way to fetch the current reference count for an NSObject (i.e.

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.