SQL insert into using CTE
问题 I am facing a performance issue due to "Insert into" statement in sql. I am using a CTE to select data from multiple tables and insert into other table. It was working just fine until yesterday. Select takes less than a minute to retrieve the data where as insert into taking forever. Can some one please help me in understanding what i am doing wrong. Any help is highly appreciated. Thanks. Here is my code: I am using this query in an SP. I am trying to load 220K records to 1.5M records table.