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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:44:14+00:00 2026-06-12T03:44:14+00:00

I have LAMP server with fast storage and a lot of memory and processor

  • 0

I have LAMP server with fast storage and a lot of memory and processor power.

There are 2 tables with same structure, one with 30.000.000 records, other is empty.
I want to copy data from first table to second and use this request:

 INSERT INTO table2 SELECT * FROM table1 ;

This request need more then 4 hours to complete. I think this is not normal because mysqldump of entire database finishes less then hour.

Are there any limits to SELECT request? Or I must use other code to optimize performance?

  • 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-12T03:44:15+00:00Added an answer on June 12, 2026 at 3:44 am

    Make sure the schema is as like as the first table, then give the order of values in Insert query. * lowers the performance of the Select query, And NoLock Increase the data availability

    like,

    Begin Tran
          INSERT INTO (Col1,Col2, Col3,...Coln) table2 
        SELECT (Col1,Col2, Col3,...Coln) FROM table1 with (NoLock)
    Commit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standard LAMP server, and currently there is a way to attach/upload
is there a way to have a LAMP server and create subdomain programatically via
I have a LAMP server where I've run the following commands to set permissions
I have setup the basic LAMP server on Ubuntu 11.10 and had a few
I have a PHP script running on my LAMP server that requires certain files
I have a php mail script sitting on a LAMP vps server. The script
We have a number of servers running various different LAMP setups. One thing that
I have a LAMP server (Quad Core Debian with 4GB RAM, Apache 2.2 and
So I have a server set up (LAMP) server, this proxy has access to
I have some basic pageview incrementing code set up on a LAMP server (see

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.