1
I’m importing some Excel spreadsheets via ETL into a relational database. The problem is that in order for me to achieve the relationship of the tables, I am using queries for the insertion of foreign keys. However, as the bank grows, these consultations are taking an absurdly long time. Is there any way to update only the last records that were included? For example:
UPDATE estrutura q
SET q.id_horizonte = (SELECT h.id_horizonte FROM horizonte h
WHERE q.observacao = h.observacao AND q.nome_horizonte = h.nome_horizonte AND q.amostra_codigo = h.amostra_codigo)
LIMIT 50
It’s not working that way, but my question is just this: is there any way that this UPDATE is not applied in all the records of the table and only in the last 50 included? This would help a lot with the performance of the queries.
Hi Mauro, I got the following error: #1235 - This Mysql version does not support 'LIMIT & IN/ALL/ANY/SOME subquery yet'
– Sabrina T.