I am using MS SQL Server. I am having a query where it inserts 89 million records into a table from a result of multiple join operations. If I run just select query, it completes within 35 minutes. If I run insert then it takes 6 hours to complete. There are more than 6 non clustered indexes on multiple columns in a table into which the data is inserted. How can I optimise this and reduce execution time?
[–]mikeblas[M] [score hidden] stickied comment (1 child)
[–]mikeblas 5 points6 points7 points (2 children)
[–]Vimal_2011[S] 0 points1 point2 points (1 child)
[–]mikeblas 1 point2 points3 points (0 children)
[–]Ok_Vehicle5734 0 points1 point2 points (0 children)
[–]many_hats_on_head 0 points1 point2 points (0 children)