I have a query that is taking forever to run on the production server.
Do you see a reason why will it take forever to insert it to a temp table... If i put my query in a cte it works fine...
This procedure was using a table variable and i changed it to a temp table but it didnt help performance wise
I found out that when i just do the select statement it works the same amount of time that cte takes but when it inserts it a temp table (around 75 rows) it takes forever.
Any help will be appreciated.
View Complete Post