I am trying to write a MySql cross table update query but it just runs and runs. I have a table called inventoryitem which is related to a table called masterproduct which is related to a table called manufacturer. I am trying to update the value of the Manufacturer_RID field in the inventoryitem to be equal to the manufacturer that is matched to the masterproduct that is matched to the inventoryitem.
There are around 1000 inventoryitems for client # 7665227, around 150,000 masterproducts and 1000 manufacturers.
My query is:
INNER JOIN masterproduct ON inventoryitem.GID = masterproduct.ID INNER
JOIN manufacturer ON masterproduct.MfgText=manufacturer.Name
I believe that I may need to use indexing to speed this up to be useable but I know nothing at all about indexing.
Could anyone point me in the right direction?