I also wanted to measure the additional memory that SQL Server would request when fulfilling each cursor type. ![]() ![]() Quite arguably the most important and common measure is, "how long did it take?" Well, it took almost five times as long to run a cursor with the default options (or with only LOCAL specified), compared to specifying either STATIC or FAST_FORWARD: OPEN c FETCH c INTO WHILE ( = 0 ) BEGIN SET += 1 - meaningless operation FETCH c INTO END CLOSE c DEALLOCATE c Results objects AS c1ĬROSS JOIN ( SELECT TOP 500 name FROM sys. ![]() DECLARE INT = 1 DECLARE c CURSOR - LOCAL - LOCAL STATIC - LOCAL FAST_FORWARD - LOCAL STATIC READ_ONLY FORWARD_ONLY FOR SELECT c1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |