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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:02:42+00:00 2026-05-20T11:02:42+00:00

I have 2 Innodb tables. IN TableA I have a column (guidNew) that I

  • 0

I have 2 Innodb tables. IN TableA I have a column (guidNew) that I want to assign its’ values to a column in TableB (owner) depending on the relation between the column in TableA (guid) and TableB (owner).

Basically Tabl6eB (owner) has multiple entries that correspond to one TableA (guid). This is a Many to One relation. I want to change the TableB(owner) value to the new TableA(guidNew) values.

This is an example of the query:

UPDATE `TableB`, `TableA`
SET
    `TableB`.`owner` = `TableA`.`guidNew`
WHERE `TableB`.`guid` != 0 
  AND `TableB`.`owner` = `TableA`.`guid`;

Now I do not know if this is working or not because there are more than 2 million entries. Is there a way to know the progress it has AND more important, a way to do it faster.

  • 1 1 Answer
  • 3 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-20T11:02:43+00:00Added an answer on May 20, 2026 at 11:02 am

    Make sure that you have indexed the guid and owner columns.

    Try using the EXPLAIN command to see how the query is being performed

    EXPLAIN SELECT TableB.owner, TableA.guidNew
    FROM TableB, TableA
    WHERE TableB.guid != 0 
    AND TableB.owner = TableA.guid
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL InnoDB table with a status column. The status can be
I have the following query (all tables are innoDB) INSERT INTO busy_machines(machine) SELECT machine
I have a search functionality that obtains data from an InnoDB table ( utf8_spanish_ci
I have a MySql db with innoDB tables. Very simplified this is how two
I want to define the value of columnA in tableA to have the count
I have 2 MySQL tables with the following schemas for a web site that's
I have 3 InnoDB tables: emails , websites and subscriptions . emails table has
I have an innodb table that contains 70 million records and already has several
I have a production database where I have renamed several column's that are foreign
I have a trigger that I want to run before insert a row into

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.