I am migrating data between two tables using the query below. I had table locking issues, so I am considering changing the table engines from MyISAM to InnoDB. Which tables do I need to do that for? Just the table I am writing to, or both the table I am writing to and the one I am reading from?
INSERT INTO table1 (
field1, field2, field2
)
SELECT
field1, field2,
(
SELECT
temp.field4
FROM
table1 AS temp
WHERE
temp.id = table2.id
ORDER BY
temp.something DESC
LIMIT
1
) + 1 AS field3
FROM
table2
WHERE
NOT EXISTS (
SELECT
1
FROM
table1 AS temp
WHERE
temp.id = table2.id
)