Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Bob Hovious
»
T-SQL: Why “It Depends”
102 posts, Page 2 of 11
««
1
2
3
4
5
»
»»
T-SQL: Why “It Depends”
Rate Topic
Display Mode
Topic Options
Author
Message
Paul White
Paul White
Posted Tuesday, March 16, 2010 6:27 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 1:02 AM
Points: 10,989,
Visits: 10,534
The Dixie Flatline (3/16/2010)
Paul: I will read over the article and see if Steve can make the changes. It's also been pointed out to me that a script to generate the sample data table really should have been included. Thanks, as always, for keeping me straight.
Thank you. I am as keen to try a recursive CTE as Joe is to try a MAX (PARTITION BY). Just for fun, y'know
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #883703
Scott Abrants
Scott Abrants
Posted Tuesday, March 16, 2010 6:38 AM
SSC Rookie
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:13 PM
Points: 43,
Visits: 306
Very nice work. Thank you for a well done article.
Post #883711
Lynn Pettis
Lynn Pettis
Posted Tuesday, March 16, 2010 6:45 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 21,620,
Visits: 27,453
Excellent article, Bob. It should be required reading for newbies so that the understand why we tell them "It Depends" so often.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #883716
Jack Corbett
Jack Corbett
Posted Tuesday, March 16, 2010 6:53 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
The Dixie Flatline (3/16/2010)
Thanks, guys.
Jack: You're right. This was written back in November. Things have been hectic since. When is the next SQL Saturday in Orlando? I need a vacation.
Well, Orlando is always in late September or early October, but Jacksonville is May 8th. I can't make that one. I am probably going to go to the Atlanta SQLSaturday on April 27th. Be great to see you there.
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #883727
AndrewJacksonZA
AndrewJacksonZA
Posted Tuesday, March 16, 2010 6:56 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 5:52 AM
Points: 165,
Visits: 1,022
Very useful article concept/theme - especially for the newbies, illustrative and effective example,
great
username (although I trust that you're not a construct
)
Post #883729
Dave62
Dave62
Posted Tuesday, March 16, 2010 7:00 AM
UDP Broadcaster
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 1,499,
Visits: 1,511
Great job with the article and an excellent example of how the same code will perform differently under various data loads.
Clearly, the answer "it depends" can be justified as you have so well done. If the answer is expanded on, as well as you have just done, it would be much more appreciated by T-SQL new comers.
Example:
___
It depends, under conditions a... answer 1.
___
Under conditions b... answer 2.
___
...
This way the new comer will actually get the "best" answer they are looking for if one of the conditions and corresponding answer relates to their situation.
Dave
Post #883733
Jeff Moden
Jeff Moden
Posted Tuesday, March 16, 2010 7:02 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 5:13 AM
Points: 32,906,
Visits: 26,793
The Dixie Flatline (3/16/2010)
Jeff: Simply thanks. I've told you before at length how much I owe you. It's good not to be savaged with a pork chop first thing in the morning.
BWAA-HAAA!!!! Well, "It Depends" on whether it's a smoked pork chop or not and whether there's a bit of apple-sauce to go with it.
Mmmmmm... pork chops.... gaaahhhh....
It's difficult to convince new and even some intermediate users that SQL Server has a proverbial "mind of its own" called the "optimizer" and that what works very well for a thousand rows may actually not be "scalable". I think this article demonstrates that quite nicely. Very well done (and I'm not talking pork chops
), Bob.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #883736
GSquared
GSquared
Posted Tuesday, March 16, 2010 7:11 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 1:55 PM
Points: 15,442,
Visits: 9,571
Just to chime in, great article.
This kind of thing is why performance tuning isn't "one and done", but is an ongoing battle. Good illustration on that.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #883743
Greg Edwards-268690
Greg Edwards-268690
Posted Tuesday, March 16, 2010 7:27 AM
Right there with Babe
Group: General Forum Members
Last Login: Today @ 8:11 AM
Points: 788,
Visits: 5,195
Well done.
Great layout of examples to test several scenarios to show why you want to test with some different volumes.
I can see this as being pointed to often.
Greg E
Post #883756
noeld
noeld
Posted Tuesday, March 16, 2010 7:35 AM
SSCertifiable
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 4:39 PM
Points: 6,260,
Visits: 1,977
I don't tend to praise a lot of articles, this one has my 5 stars!
Great Job.
* Noel
Post #883763
« Prev Topic
|
Next Topic »
102 posts, Page 2 of 11
««
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.