Wednesday, March 21, 2012

How many result-rows does mssql return should be used asynchronous method to use mssql cur

How many result-rows does mssql return should be used asynchronous method to use mssql cursor, can get the best performance in any time in any result offset?

i want to make the cursor fast in any time whatever how many results returnedi didnt understand what xactly you meant by your first line but for this
>>i want to make the cursor fast in any time whatever how many results returned

there some optional parameters when you declare a cursor..for xample :
BOL has a good reference about it..look under 'DECLARE CURSOR'


Transact-SQL Extended Syntax
DECLARE cursor_name CURSOR
[ LOCAL | GLOBAL ]
[ FORWARD_ONLY | SCROLL ]
[ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ]
[ READ_ONLY | SCROLL_LOCKS | OPTIMISTIC ]
[ TYPE_WARNING ]
FOR select_statement
[ FOR UPDATE [ OF column_name [ ,...n ] ] ]

you can use LOCAL, FORWARD_ONLY, READ_ONLY etc options to make it faster..

hth|||nono, i means the command like this:

sp_configure 'cursor threshold', xxx( a number, -1 = all synchronous, 0 = all asynchronous)

No comments:

Post a Comment