Hi,
I have a SQL Server Stored Procedure for a very complex select statment which involves the union of 3 select statements.
The query result for a 10 days period is between 50,000 and 80,000 records, which I have to group and sum (I do that on CR).
Everything is fine except that when I run the query from CR, it takes more than 20 minutes to complete and all other applications are blocked until I end CR task.
If I run the query from Query Analizer all it's fine and the query takes about 5 minutes or less to complete.
I'm using the option: "WITH (nolock)" for each table on the FROM clause of the select statements.
Any help would be much appreciated.
Magda
________________
Magda Banuet
I have a SQL Server Stored Procedure for a very complex select statment which involves the union of 3 select statements.
The query result for a 10 days period is between 50,000 and 80,000 records, which I have to group and sum (I do that on CR).
Everything is fine except that when I run the query from CR, it takes more than 20 minutes to complete and all other applications are blocked until I end CR task.
If I run the query from Query Analizer all it's fine and the query takes about 5 minutes or less to complete.
I'm using the option: "WITH (nolock)" for each table on the FROM clause of the select statements.
Any help would be much appreciated.
Magda
________________
Magda Banuet