Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_cursorprepexec too slow in executing

Author  Topic 

akumar.ana06
Starting Member

4 Posts

Posted - 2010-05-24 : 13:16:11
Hi. I have store procedure which works fine in test environment but executes too slow in production. We have MS SQL sever 8.00.760, SP3 in test and 8.00.2040, SP4 in production. Find below code for reference.

Any help!


declare @P1 int

set @P1=-1

declare @P2 int

set @P2=0

declare @P3 int

set @P3=28688

declare @P4 int

set @P4=8193

declare @P5 int

set @P5=102

exec sp_cursorprepexec @P1 output, @P2 output, N'@P1 decimal(38,0),@P2 decimal(38,0)', N'SELECT PARM_SEQ, MESSAGE_PARM
FROM PS_MESSAGE_LOGPARM (READUNCOMMITTED)
WHERE PROCESS_INSTANCE = @P1
AND MESSAGE_SEQ = @P2', @P3 output, @P4 output, @P5 output, 983843, 1

select @P1, @P2, @P3, @P4, @P5


Thanks,
Best Regards,
kumar.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-24 : 13:24:31
What's the execution plan? Why are you using READUNCOMMITTED?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -