I have 70MIL records to insert into a table3 from table1 - 4 fields and table2 - 1 field . The following code does exactly what I need in the most optimized way a user has helped me build.
INSERT INTO imagens3 (ID, IMOVEL, CODIGO, IMAGEM_G, IMAGEM_P)
SELECT t1.ID, t1.IMOVEL, t1.CODIGO, t2.IMAGEM_G, t1.IMAGEM_P
FROM imagens1 t1 INNER JOIN imagens2 t2 ON t1.ID = t2.ID LIMIT 10000
I need to enter 10MIL at a time to get to the end of my work successfully.
How can I create a statement to insert 10MIL records at a time through php?