I have created a cursor in a sp that is causing me some problems.
If I run the select statement(only) in Query Analyser I get a nil result in approx 1 sec - this is fine!
But if I create the cursor in QA or in the sp, everything is still fine until I issue the 'open' command. Opening the cursor takes about 4 minutes. The select statement is reasonably simple (1 inner join and two condition where clause)
Why does opening a nil result cursor take so long? And what can I do to improve this.
I am using SQL Server 7, WinNT 4.0 sp6
TIA
Tom W
[sig][/sig]
If I run the select statement(only) in Query Analyser I get a nil result in approx 1 sec - this is fine!
But if I create the cursor in QA or in the sp, everything is still fine until I issue the 'open' command. Opening the cursor takes about 4 minutes. The select statement is reasonably simple (1 inner join and two condition where clause)
Why does opening a nil result cursor take so long? And what can I do to improve this.
I am using SQL Server 7, WinNT 4.0 sp6
TIA
Tom W
[sig][/sig]