May 16, 2008 at 3:42 am
SELECT TOP 5000 AVG(ISNULL(DATALENGTH(Deleted),0)+ISNULL(DATALENGTH(GroupID),0)+ISNULL(DATALENGTH(Members),0)+ISNULL(DATALENGTH(MembershipModTag),0)) FROM Groups
Ans: 860
SELECT MAX( DATALENGTH(Members) ) FROM Groups
Ans: 98295
declare @P1 int
set @P1=180150000
declare @P2 int
set @P2=4
declare @P3 int
set @P3=1
declare @P4 int
set @P4=-1
exec sp_cursoropen @P1 output, N'SELECT Deleted,GroupID,Members,MembershipModTag FROM Groups', @P2 output, @P3 output, @P4 output
select @P1, @P2, @P3, @P4
exec sp_cursorfetch 180150000, 2, 1, 3
'exec sp_cursorfetch 180150000, 2, 1, 3' statement will executes 41507 time thus making the application very slow. Why this 'exec sp_cursorfetch 180150000, 2, 1, 3' statements run?
If i run these queries directly on the Query analyser, 'exec sp_cursorfetch 180150000, 2, 1, 3' will not run at all. Is there any solution?
June 24, 2008 at 6:51 pm
The code you have posted is not meant to be executed by you... things like sp_cursoropen are SQL Server code that appears when SQL Server actually runs a stored proc.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy