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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:17:38+00:00 2026-06-07T03:17:38+00:00

So my expertise is not in MySQL so I wrote this query and it

  • 0

So my expertise is not in MySQL so I wrote this query and it is starting to run increasingly slow as in 5 minutes or so with 100k rows in EquipmentData and 30k or so in EquipmentDataStaging (which to me is very little data):

   CREATE TEMPORARY TABLE dataCompareTemp 
   SELECT eds.eds_id FROM equipmentdatastaging eds
   INNER JOIN equipment e ON e.e_id_string = eds.eds_e_id_string
   INNER JOIN equipmentdata ed ON e.e_id = ed.ed_e_id 
       AND eds.eds_ed_log_time=ed.ed_log_time 
       AND eds.eds_ed_unit_type=ed.ed_unit_type
       AND eds.eds_ed_value = ed.ed_value

I am using this query to compare data rows pulled from a clients device to current data sitting within their database. From here I take the temp table and use the ID’s off it to make conditional decisions. I have the e_id_string indexed and I have e_id indexed and everything else is not. I know that it looks stupid that I have to compare all this information, but the clients system is spitting out redundant data and I am using this query to find it. Any type of help on this would be greatly appreciated whether it be a different approach by SQL or MySql Management. I feel like when I do stuff like this in MSSQL it handles the requests much better, but that is probably because I have something set up incorrectly.

  • 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-07T03:17:40+00:00Added an answer on June 7, 2026 at 3:17 am

    TIPS

    • index all necessary columns which are using with ON or WHERE condition
      here you need to index eds_ed_log_time,eds_e_id_string, eds_ed_unit_type, eds_ed_value,ed_e_id,ed_log_time,ed_unit_type,ed_value

    • change syntax to SELECT STRAIGHT JOIN … see more reference

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

Sidebar

Related Questions

This question is for Mysql geospatial-extension experts. The following query doesn't the result that
I was trying an exercise of deleting lines from a file not starting with
This is a thought exercise, not a particular problem, but I'd like to hear
This is probably an easy question for anyone with any moderate expertise with web
I got stumbled upon this issue once and I guess I need some expertise
I don't know if anyone has any expertise with Novell Netware or not, but
Hopefully this is a brainlessly easy question, but it shows my lack of expertise
Hi mistakenly I have deleted my MySQL database from Windos XP based PC (this
I have a mysql table , which holds data like this. Name |how_out |runs
UPDATE I am still debugging this issue and still have not found a solution.

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.