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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:41:56+00:00 2026-05-26T13:41:56+00:00

I have this new challenge to load ~100M rows from an Oracle database and

  • 0

I have this new challenge to load ~100M rows from an Oracle database and insert them in a remote MySQL database server.

I’ve divided the problem in two:

  1. a server side REST server responsible for loading data into the MySQL server;
  2. a client side Java app that is responsible from loading the Oracle data source.

At the Java side I’ve used plain JDBC for loading paginated content and transfer it over the wire to the server. This approach works well but it makes the code cumbersome and not very scalable as I’m doing pagination myself using Oracle’s ROWNUM…..WHERE ROWNUM > x and ROWNUM < y.

I’ve now tried Hibernate’s StatelessSession with my entities mapped through Annotations. The code is much more readable and clean but the performance is worse.

I’ve heard of ETL tools and SpringBatch but I don’t know them very well.
Are there other approaches to this problem?

Thanks in advance.

UPDATE

Thank you for the invaluable suggestions.
I’ve opted for using SpringBatch to load data from the Oracle database because the environment is pretty tight and I don’t have access to Oracle’s toolset. SpringBatch is trie and true.
For the data writing step I opted for writing chunks of records using MySQL’s LOAD DATA INFILE as you all stated. REST services are in the middle as they are hidden from each other for security reasons.

  • 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-26T13:41:56+00:00Added an answer on May 26, 2026 at 1:41 pm

    100M rows is quite a lot. You can design it in plenty of ways: REST servers, JDBC reading, Spring Batch, Spring integration, Hibernate, ETL. But the bottom line is: time.

    No matter what architecture you choose, you eventually have to perform these INSERTs into MySQL. Your mileage may vary but just to give you an order of magnitude: with 2K inserts per second it’ll take half a day to populate MySQL with 100M rows (source).

    According to the same source LOAD DATA INFILE can handle around 25K inserts/second (roughly 10x more and about an hour of work).

    That being said with such an amount of data I would suggest:

    • dump Oracle table using native Oracle database tools that produce human readable content (or computer readable, but you have to be able to parse it)

    • parse the dump file using as fast tools as you can. Maybe grep/sed/gawk/cut will be enough?

    • generate target file compatible with MySQL LOAD DATA INFILE (it is very configurable)

    • Import the file in MySQL using aforementioned command

    Of course you can do this in Java with nice and readable code, unit tested and versioned. But with this amount of data you need to be pragmatic.

    That is for initial load. After that probably Spring Batch will be a good choice. If you can, try to connect your application directly to both databases – again, this will be faster. On the other hand this might not be possible for security reasons.

    If you want to be very flexible and not tie yourself into databases directly, expose both input (Oracle) and output (MySQL) behind web-services (REST is fine as well). Spring integration will help you a lot.

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

Sidebar

Related Questions

I have this: var date = new DateTime(2009, 12, 5); ... ... and need
I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int
I have this block of code: users = Array.new users << User.find(:all, :conditions =>
I have this code public static Boolean freq[] = new Boolean[Global.iParameter[2]]; freq[Global.iParameter[2]] = false;
I have this code: ServerSocket serverSideSocket = new ServerSocket(1234); serverSideSocket.accept(); BufferedReader in = new
i have this code: var list = new List<int>(); for(int i=0;i<10;i++) list.Add(i); for(int i=0;i<10;i++)
I have this in my controller: MyTestViewModel asdf = new MyTestViewModel { SomeTestDate =
I have this array: string[,] productData = new string[5,7]; I bind it to a
I am new to C and i have this question. why does the following
I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. }

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.