I am executing one SQL query in SQL Server Management Studio (2008) and the same query using SqlCommand (.net 3.5) in C#.
In Management Studio the query executes in 1.6 minutes to complete. The same query is taking 9 minutes using SqlCommand in C#.
Why is the huge difference between SQL Server Management Studio & SqlCommand?
Please somebody help me in finding the solution in fixing the time difference.
Thanks in advance.
The query:
SELECT * INTO [target_table]
FROM [source_table] WHERE Group_ID IN (1,2,3,4,5,6,7,8,9,10)
This copies around 1 million rows into target_table & table contains 220 columns.
Group_ID?