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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:21:09+00:00 2026-06-09T06:21:09+00:00

I think I’m having an issue with my MySQL server or the Query I’m

  • 0

I think I’m having an issue with my MySQL server or the Query I’m using. I’m not sure which.

Server is VM Ubuntu12.4 4 cores/16gb Ram
MySQL 5.5.24 x86

My query:

INSERT INTO `NEWTEXT`.`Order_LineDetails`

( OrderLineItem_ID, Customer_ID, Order_ID, ProductName )
SELECT
'Order_Details'.'OrderDetailID',
'Orders'.'CustomerID',
'Order_Details'.'OrderID',
'prods'.'ProductName'

FROM Order_Details 
JOIN Orders ON Orders.OrderID = Order_Details.OrderID
JOIN Products prods ON prods.ProductID = Order_Details.ProductID
WHERE Orders.OrderID = 500000

I’m not really sure where to start looking for the problem. The above query takes 9+ seconds to complete. The Order_Details table contains 1,800,000+ records in it.

The thing that is bugging me on this is that when I run a select query it also goes slow. BUT, I have another server that’s running win2k MsSql and its almost instant with the same SELECT query.

I’m hoping someone could point me in the right direction here.

EDIT

Well, sorry for the troubles and thanks for your help.

I found that the problem was that after I finished the import I skipped the step where I would normally assign the new tables a PrimaryKey. I know, 🙁 dumb.

Anyway! Don’t forget to assign your Primary Keys!

  • 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-09T06:21:12+00:00Added an answer on June 9, 2026 at 6:21 am

    Back to the start:
    http://dev.mysql.com/doc/refman/5.5/en/optimizing-primary-keys.html

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

Sidebar

Related Questions

I think my question revolves around me not having a comfortable grasp of page
I think this is a simple SQL query problem, but I am just not
I think I've figured out the problem. I'm using a IP webcam stream, doing
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Think about the games like Spiral Knights and Minecraft(Which I believe both use LWJGL)
I think this has probably been asked, but after reading a lot, I'm not
Think about a rectangular div, which is split into 2 parts, each part is
I think I have a fairly basic question here. I'm not trying to waste
Think you are the proud owner of Facebook, then which data you want to
I think that I have a quite strange question. I am using a class

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.