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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:58:03+00:00 2026-05-22T23:58:03+00:00

In a C# program I am importing a large text file (300mb) into a

  • 0

In a C# program I am importing a large text file (300mb) into a MySQL database via the MySqlBulkLoader function of the MySql .Net Connector.

The import takes quite a long time and results in almost 100% disk usage on the Windows 2003 Server it is running on. In an attempt to speed up the import the program nows splits the big file into smaller chunks.

Would it be possible to read the small file chunk (8mb) into memory (ie array) and then pass it to the MySQLBulkLoader as a file?

The bulk loader looks for a filename path:

 MySql.Data.MySqlClient.MySqlBulkLoader myBulk = new MySql.Data.MySqlClient.MySqlBulkLoader(connection);                
 myBulk.Timeout = 10 * 60; /
 myBulk.TableName = "some_table";                
 myBulk.Local = true;
 myBulk.LineTerminator = @"\n";
 myBulk.FileName = aFile.FullName;
 myBulk.FieldTerminator = "";
  • 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-22T23:58:04+00:00Added an answer on May 22, 2026 at 11:58 pm

    Memory isn’t a file, so the short answer is no. The alternatives are:

    1. Read through the file, writing it out as a temporary file (System.IO.Path.GetTempFileName() is your friend here, for the name to give the partial file) and passing that filename to MySqlBulkLoader
    2. Use a “RAM Disk” tool to create a memory based disk to put a copy of the full 300Mb file on, then pass that files path to MySqlBulkLoader.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A recent project called for importing data into an Oracle database. The program that
After profiling a large game playing program, I have found that the library function
What program can I use to decompile a class file? Will I actually get
I'm importing a legacy db to a new version of our program, and I'm
I'm trying to use Sam Saffron's program SoSlow (as suggested here ) for importing
I have a fairly large program written in C. It spans several files, and
I'm writing a program which will need to do a very large number of
I have been tasked with making an existing Java program available via a web
I have a large file, with 1.8 million rows of data, that I need
I copied the text of my program to another computer, but there is some

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.