Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't do this enough to remember.

Status
Not open for further replies.

elentz

Technical User
Jan 9, 2007
81
US
Would someone please comment as to why this Update query freezes my Mysql server. As the subject says I don't do this enough to be very good at it.

Update Vtiger_Backup.vtiger_products x, Vtiger_Backup.commsource z Set x.mfr_part_no = z.VendorPartNumber, x.manufacturer = z.Vendor, x.productcategory = z.category Where z.partno = x.productcode


In the products table there is 16000, and the commsource there is approx 7400 records. I am not getting any errors the page never reloads after a half hour.

Thanks for looking.

Ed
 
Do the fields z.partno and x.productcode have a 1 to 1 ratio? Are they both indexed?

Could you provide the table layout? Some sample data might be helpful also.

Mark
 
Well, the ratio is 1 to 1. The commsource table didn't have an index so I made the partno the primary and it found a duplicate that I didn't know was there. I tried the query again and it updated just like I wanted. Thanks Mark for the push in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top