I created a query in which I insert to a empty table the result of a select from other table.
This select itself takes ~20 minutes (30 M Rows, 120 Columns and "Where" conditions, and it's fine), but the insert into takes ~1 hour.
Do you have any suggestions of how to improve it?
What I've done is as in the below example.
Insert Into tableA
Select *
From TableB
Appreciate your help!
Drop all the indexes on TableA
, then insert again :
INSERT INTO tableA
SELECT * FROM TableB
Indexes are known to slow down insert statements .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With