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 Paul White
»
Understanding and Using APPLY (Part 1)
90 posts, Page 1 of 9
1
2
3
4
5
»
»»
Understanding and Using APPLY (Part 1)
Rate Topic
Display Mode
Topic Options
Author
Message
Paul White
Paul White
Posted Saturday, April 10, 2010 12:03 PM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 7:18 PM
Points: 10,989,
Visits: 10,532
Comments posted to this topic are about the item
Understanding and Using APPLY (Part 1)
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #901119
Paul White
Paul White
Posted Saturday, April 10, 2010 9:38 PM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 7:18 PM
Points: 10,989,
Visits: 10,532
I would like to express my sincere thanks to the following people, for their help in producing this article:
Amanda Lawrence
Jeff Moden MVP
Chris Morris
Lutz Müller
Jason Brimhall
Thank you everyone!
Paul
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #901178
Matt Whitfield
Matt Whitfield
Posted Monday, April 12, 2010 12:55 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Friday, February 15, 2013 7:29 AM
Points: 509,
Visits: 718
Great article Paul - look forward to Part 2.
Atlantis Interactive -
SQL Server Tools
My blog
Why I wrote a
sql query analyzer
clone
Post #901378
Christian Buettner-167247
Christian Buettner-167247
Posted Monday, April 12, 2010 1:38 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 1:06 AM
Points: 2,525,
Visits: 3,618
Thank you, Paul. This is great work. Not only the code & explanation, but equally important: the design of the article. Very easy to read with good illustrations & examples. More of that please! This is the meat of SQL Server Central!
Best Regards,
Chris Büttner
Post #901394
mohd.nizamuddin
mohd.nizamuddin
Posted Monday, April 12, 2010 2:53 AM
Old Hand
Group: General Forum Members
Last Login: Friday, July 29, 2011 4:14 AM
Points: 318,
Visits: 198
Nice Article Paul. It is very well expalined with example.
I have a doubt, since the UDTF would get executed as many times as the row count of primary resultset (Student's Count). So, would it not affect the performamance. Because this same can be achived by a simple join and that get executed in a set. (I know, you have used this example for illustration purpose.
).
For maintenability and readibility, this concept is fine enough.
Well, Please suggest that which is better approach in terms of performance:
Use of UDTF with CROSS APPLY
(to a certain extent, which cannot be achived by simple SQL)
or
Putting all tables / view in the final SQL
Post #901419
Paul White
Paul White
Posted Monday, April 12, 2010 3:10 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 7:18 PM
Points: 10,989,
Visits: 10,532
mohd.nizamuddin (4/12/2010)
Nice Article Paul. It is very well expalined with example.
I have a doubt, since the UDTF would get executed as many times as the row count of primary resultset (Student's Count). So, would it not affect the performamance. Because this same can be achived by a simple join and that get executed in a set. (I know, you have used this example for illustration purpose.
).
For maintenability and readibility, this concept is fine enough.
Well, Please suggest that which is better approach in terms of performance:
Use of UDTF with CROSS APPLY
(to a certain extent, which cannot be achived by simple SQL)
or
Putting all tables / view in the final SQL
Thanks - you raise some interesting questions, which will be fully addressed in part 2, next week
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #901425
mohd.nizamuddin
mohd.nizamuddin
Posted Monday, April 12, 2010 3:19 AM
Old Hand
Group: General Forum Members
Last Login: Friday, July 29, 2011 4:14 AM
Points: 318,
Visits: 198
Paul White NZ (4/12/2010)
mohd.nizamuddin (4/12/2010)
Nice Article Paul. It is very well expalined with example.
I have a doubt, since the UDTF would get executed as many times as the row count of primary resultset (Student's Count). So, would it not affect the performamance. Because this same can be achived by a simple join and that get executed in a set. (I know, you have used this example for illustration purpose.
).
For maintenability and readibility, this concept is fine enough.
Well, Please suggest that which is better approach in terms of performance:
Use of UDTF with CROSS APPLY
(to a certain extent, which cannot be achived by simple SQL)
or
Putting all tables / view in the final SQL
Thanks - you raise some interesting questions, which will be fully addressed in part 2, next week
That would be great. Highly appriciated your quick response.
Post #901430
Tom Garth
Tom Garth
Posted Monday, April 12, 2010 5:54 AM
SSC Eights!
Group: General Forum Members
Last Login: Friday, February 04, 2011 7:20 AM
Points: 977,
Visits: 1,499
Thanks Paul. Nice work, and I'm looking forward to part 2.
Tom Garth
Vertical Solutions
"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers
Post #901501
Jack Corbett
Jack Corbett
Posted Monday, April 12, 2010 6:03 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
Good post Paul, as expected. Clear, concise, and good examples. Looking forward to part 2.
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 #901509
WayneS
WayneS
Posted Monday, April 12, 2010 7:01 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 4:35 PM
Points: 6,369,
Visits: 8,232
Paul,
Most excellent! This has been bookmarked, and I'm also looking forward to Part II
Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then
DON'T USE IT
on a production system! After all,
you
will be the one supporting it!
Links:
For better assistance in answering your questions
,
How to ask a question
,
Performance Problems
,
Common date/time routines
,
CROSS-TABS and PIVOT tables Part 1
&
Part 2
,
Using APPLY Part 1
&
Part 2
,
Splitting Delimited Strings
Post #901572
« Prev Topic
|
Next Topic »
90 posts, Page 1 of 9
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.