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 «««4,3514,3524,3534,3544,355»»»

Are the posted questions getting worse? Expand / Collapse
Author
Message
Posted Saturday, March 29, 2014 5:15 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 7:35 AM
Points: 325, Visits: 3,190
ChrisM@Work (3/28/2014)
WayneS (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx


I believe it's due to developers that know how to write basic select, insert, update, delete statements, and for everything else, it's a cursor. Because all that they know is procedural (iterative) processing, and they won't learn the set-based way of doing it.


That's like getting a sparky (electrician, UK) ...

ah - it depends, HM Navy radio/comms operators get quite huffed if you refer to an electrician as a Sparky. It's not a mistake I made twice.
Deliberately a few times, like.


I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
Post #1556253
Posted Sunday, March 30, 2014 5:32 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 6:12 PM
Points: 3,609, Visits: 5,220
Sean Lange (3/28/2014)
dwain.c (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx

Based on what I have to deal daily answer is easily :-(
This kind of things happen when programmers write t-SQL.


Here, here! Let's keep all the programmers out of SQL!

What sayeth the SQLverse?


There are more programmers around here (including me) than you realize. Gail and Lowell, Jack Corbett...not sure who else I might be missing.


Perhaps I should have added a smiley or something to denote the somewhat tongue-in-cheek nature of my statement.

Obviously, it was not meant to include people that actually have skills like you Sean.



My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
Post #1556309
Posted Sunday, March 30, 2014 5:34 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 6:12 PM
Points: 3,609, Visits: 5,220
SQLRNNR (3/28/2014)
Sean Lange (3/28/2014)
dwain.c (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx

Based on what I have to deal daily answer is easily :-(
This kind of things happen when programmers write t-SQL.


Here, here! Let's keep all the programmers out of SQL!

What sayeth the SQLverse?


There are more programmers around here (including me) than you realize. Gail and Lowell, Jack Corbett...not sure who else I might be missing.


Would you call yourselves programmers or developers?

I have often heard that programmers are more like code monkeys and developers have higher skills.


BWAHAHAHAHA! Oops, sorry. Normally I try to scrupulously avoid commentary about the skills of the "developers" at my company.

The fact that they actually have the gall to call them "software engineers" is a blatant insult to anyone that actually graduated with an engineering degree.



My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
Post #1556311
Posted Sunday, March 30, 2014 5:45 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 6:12 PM
Points: 3,609, Visits: 5,220
Ville-Pekka Vahteala (3/28/2014)
TomThomson (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx

Based on what I have to deal daily answer is easily :-(
This kind of things happen when programmers write t-SQL.

It's clear that when programmers who have experience only in some badly designed language like C++ or VB will make a complete wreck of anything they try to do in SQL unless they have some decent Sql training, but tarring all programmers with that brush is narrow-minded prejudice, as is assuming that all bad SQL is written by programmers and not by the DBAs.

Oh Tom you must be judging me then :)
Most of my programming experience is from c++ and PHP and I have newer attended any SQL training.


Neither have I. There's training available for SQL?



My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
Post #1556312
Posted Monday, March 31, 2014 12:55 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
dwain.c (3/30/2014)
The fact that they actually have the gall to call them "software engineers" is a blatant insult to anyone that actually graduated with an engineering degree.


True dat

I have the degree of "Master of Science in Engineering: computer science with minor software engineering", so I can call myself either computer scientist or software engineer. I have never used it though and probably never will. It would be an insult to actual computer scientists and software engineers I just go with BI developer instead

(my official title at my current company is Senior Business Analytics Architect, if I'm not mistaken. What's in a name?)




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1556344
Posted Monday, March 31, 2014 1:01 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 6:12 PM
Points: 3,609, Visits: 5,220
Koen Verbeeck (3/31/2014)
dwain.c (3/30/2014)
The fact that they actually have the gall to call them "software engineers" is a blatant insult to anyone that actually graduated with an engineering degree.


True dat

I have the degree of "Master of Science in Engineering: computer science with minor software engineering", so I can call myself either computer scientist or software engineer. I have never used it though and probably never will. It would be an insult to actual computer scientists and software engineers I just go with BI developer instead

(my official title at my current company is Senior Business Analytics Architect, if I'm not mistaken. What's in a name?)


My uni degree is "Master of Science in Systems Engineering" so that's pretty close. For a while I had the title of "Senior Engineering Systems Analyst" which I treasured. Now I'm just a project manager so I'm not expected to know anything technical about computers, judging by some of the project managers I've seen recruited out of business schools.



My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
Post #1556349
Posted Monday, March 31, 2014 1:05 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
dwain.c (3/31/2014)
Now I'm just a project manager so I'm not expected to know anything technical about computers, judging by some of the project managers I've seen recruited out of business schools.


A decent project manager should be able to manage projects of any kind, be it IT or construction or ...
It does help to be a bit technical so you can at least verify if the estimates are a bit realistic




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1556350
Posted Monday, March 31, 2014 1:51 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:57 AM
Points: 7,115, Visits: 13,476
Revenant (3/28/2014)
TomThomson (3/28/2014)
Ville-Pekka Vahteala (3/28/2014)
TomThomson (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx

Based on what I have to deal daily answer is easily :-(
This kind of things happen when programmers write t-SQL.

It's clear that when programmers who have experience only in some badly designed language like C++ or VB will make a complete wreck of anything they try to do in SQL unless they have some decent Sql training, but tarring all programmers with that brush is narrow-minded prejudice, as is assuming that all bad SQL is written by programmers and not by the DBAs.

Oh Tom you must be judging me then :)
Most of my programming experience is from c++ and PHP and I have newer attended any SQL training.

I see that I managed to lose some words - I'll leave it as an excercise to the reader to work out what should have come between "VB" and "will".

As to judging people, I prefered not to judge except by experience of the person being judged; of course when recruiting I had to judge by resumés and interviews, but I no longer have to do that.

If I may note, there is a dearth of developers who are able to work in both a (mostly) procedural language and at the same time in SQL, in both above the average.

In, say, C# you have to think 'What will I accomplish in this line of code and what will I do in the next one?'; in SQL it is 'What I can do to this column/these columns to get it done in one step?'.

If you can do it, you might be classified as MPD (Multiple Personality Disorder). Unfortunately, I am not kidding on this one - the pharmaceutical complex is always looking for new customers and psychiatrists are, at least in NA, willing if not enthusiastic accomplices.

However, I am always lookin'.

Have a great weekend.


Way back in the early 90's many of us FoxPro programmers waited with bated breath for MS' release of a product which included a crude implementation of SQL. After all, why scan and process a table one row at a time for a report or whatever when you could process the whole lot in one go? When it arrived it was a game-changer. Same result, far less code, far better performance. If you are looking for folks who can do both procedural and set-based, look no further than programmers who cut their teeth on FoxPro and VFP - and grabbed SQL with both hands when it appeared.


“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Exploring Recursive CTEs by Example Dwain Camps
Post #1556367
Posted Monday, March 31, 2014 1:56 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:57 AM
Points: 7,115, Visits: 13,476
andrew gothard (3/29/2014)
ChrisM@Work (3/28/2014)
WayneS (3/27/2014)
Luis Cazares (3/27/2014)
How is it possible that someone writes a cursor instead of using SUM()?
I'm afraid that this database is full of these pieces of sh code and it's slower than a snail going backwards.

http://www.sqlservercentral.com/Forums/FindPost1555701.aspx


I believe it's due to developers that know how to write basic select, insert, update, delete statements, and for everything else, it's a cursor. Because all that they know is procedural (iterative) processing, and they won't learn the set-based way of doing it.


That's like getting a sparky (electrician, UK) ...

ah - it depends, HM Navy radio/comms operators get quite huffed if you refer to an electrician as a Sparky. It's not a mistake I made twice.
Deliberately a few times, like.


Chuckle - the armed forces take great delight in nicknames and this post reminds me of one of my dad's Nimrod crewmates, a signaller, who was tagged "Simple Sig" because he wasn't the sharpest tool in the block


“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Exploring Recursive CTEs by Example Dwain Camps
Post #1556369
Posted Monday, March 31, 2014 6:26 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: Today @ 12:16 PM
Points: 961, Visits: 4,973
ChrisM@Work (3/31/2014)
Way back in the early 90's many of us FoxPro programmers waited with bated breath for MS' release of a product which included a crude implementation of SQL. After all, why scan and process a table one row at a time for a report or whatever when you could process the whole lot in one go? When it arrived it was a game-changer. Same result, far less code, far better performance. If you are looking for folks who can do both procedural and set-based, look no further than programmers who cut their teeth on FoxPro and VFP - and grabbed SQL with both hands when it appeared.


OK, but what about the Foxpro programmers who stayed stuck in the "row-by-row" mentality?

Which, I think just described my previous employer...
Post #1556441
« Prev Topic | Next Topic »

Add to briefcase «««4,3514,3524,3534,3544,355»»»

Permissions Expand / Collapse