Cursors, SetBased, and Scalar UDF

This is an oldie but a goodie.

If you’re doing CURSOR development for Sql Server to solve business problems, then STOP.

DOWNLOAD this file (right-click and save-as works best) for an example of non cursor based logic solving.

03 and 04 solve the
same business problem, but 2 different ways. 

03 is the cursor
model.  04 is the udf model.

Read the comments, and try to make a decent sized database (row count) so you see the massive and significant time difference.

 

About these ads
This entry was posted in Software Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s