Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««3536373839

There Must Be 15 Ways To Lose Your Cursors... part 1, Introduction Expand / Collapse
Author
Message
Posted Tuesday, June 29, 2010 7:38 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 11:40 AM
Points: 810, Visits: 2,121
Hmmm...this thread seems familiar...but let's not poke that sleeping tiger.

Gaby
________________________________________________________________
"In theory, theory and practice are the same. In practice, they are not."
- Albert Einstein
Post #944649
Posted Friday, July 2, 2010 1:52 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, December 5, 2013 7:19 AM
Points: 69, Visits: 65
I agree - don't awaken the beast.

In the eyes of developers, cursors are like Marmite.
Post #946629
Posted Friday, July 2, 2010 6:55 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,902, Visits: 9,480
ZZZZZZZZZZZZZZZZZZZZZZ ... mmha grmmah mrmma ... ZZZZZZZZZZZZZZZZZZZZ

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #946783
Posted Sunday, July 4, 2010 9:45 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 20, 2012 12:19 AM
Points: 1, Visits: 12
I also found this article rather insulting. I almost never use cursors. In fact, I think I should use them more. I sometimes find myself dong mental jujitsu, trying to write set-based T-SQL, when the task lends itself more easily to procedural code.

Of course they are slower, but sometimes performance is not as important as writing something that is simple and easily maintainable. Arguing that programmers are lazy and dumb is all the more reason to write something in a way that your (lazy, dumb) successors will understand.

Obviously anyone reading this article is interested in avoiding cursors, so why start off with a self-indulgent rant? JMHO.
Post #947368
Posted Sunday, July 4, 2010 11:14 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 14, 2014 4:18 PM
Points: 1,276, Visits: 1,132
mschroeppel (7/4/2010)
I also found this article rather insulting. I almost never use cursors. In fact, I think I should use them more. I sometimes find myself dong mental jujitsu, trying to write set-based T-SQL, when the task lends itself more easily to procedural code.

Of course they are slower, but sometimes performance is not as important as writing something that is simple and easily maintainable. Arguing that programmers are lazy and dumb is all the more reason to write something in a way that your (lazy, dumb) successors will understand.

Obviously anyone reading this article is interested in avoiding cursors, so why start off with a self-indulgent rant? JMHO.


Set-based processing does stretch the old brain cells a bit, but as you point out everyone understands a loop.

I just had a recent discussion with a group about the benefits of writing extremely simplistic code versus efficiency (and several other programming oddities, btw). I listed out several coding priorities and challenged them to put their coding priorities in the correct order for their business. If you try this exercise and "efficiency" is at the bottom of the list, then you obviously have to code to your priorities.

Mike C
Post #947375
« Prev Topic | Next Topic »

Add to briefcase «««3536373839

Permissions Expand / Collapse