Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting row count as part of DB design info
Message
From
04/02/2008 12:55:57
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01289085
Message ID:
01289151
Views:
16
>>>>Wow. Thank you all. What a great response. Naomi, your links provided great information. Borislav, thank you for your dynamic SQL example. I have not used dynamic SQL much, but will definatly look to it more often. Sergey, you are always so helpful, and right on the money. I was able to put your example together with Borislav's (untested) to make it work.
>>>>
>>>>My hat's off to all of you. Your assistance and time are very appreciated.
>>>
>>>Just be aware that many DBA block Dynamic SQL for security reasons.
>>
>>Thanks for the heads up. I have been looking more at this code. Does the while loop increment that much faster than a cursor, and assuming it does, why?
>
>You should test.
>
>From all I read (everywhere) CURSORs are declared as one of the performance killers.
>Maybe because CURSORs trying to do something that is not the nature of SQL Server, working row-by-row, not with SETs.
>But again TEST. Do not trust to anybody. It is your code and you should be blamed if something goes wrong.
>:-)

Good advice. That was the basis of my question. The cursor loops each row, but it seems the while loop does as well.
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Previous
Reply
Map
View

Click here to load this message in the networking platform