troubleshooting Question

MySQL server database query

Avatar of toooki
toooki asked on
MySQL ServerDatabases
13 Comments1 Solution325 ViewsLast Modified:
I have two database tables TAB1 TAB2 both in MYSQL server database.
Both tables have identical field names and data types as below:

F1  SMALLINT
F2  TIMESTAMP
F3  CHAR
F4  VARCHAR
F5  INT
F6  INT
F7  INT
F8  VARCHAR

I need to UPDATE all the values of F2 field (TIMESTAMP values) in TAB2 with the
correct values of F2 field in TAB1 (where rest of the record contents match in both tables).

There are NO primary keys in the tables.
TAB2 has ~800K records and TAB1 has ~900K records.
All the entries (with incorrect F1 field values) in TAB1
should ideally be in the TAB2 table.

What should be the best way to make this update?
Performance of the update query seems to be a big problem.
ASKER CERTIFIED SOLUTION
Aaron Tomosky
Director, SD-WAN Solutions

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros