T-SQL Tuesday

Invitation to T-SQL Tuesday #17 – APPLY Knowledge

Logo for T-SQL Tuesday

T-SQL Tuesday

Edit: the party is over, but you can check out our contributors here.

Time to get revved up for T-SQL Tuesday the 17th. As a reminder, here’s Adam’s definition of T-SQL Tuesday:

T-SQL Tuesday is the SQL Server blogosphere’s first recurring, revolving blog party. The idea is simple: Each month a blog will host the party, and about a week before the second Tuesday of the month a theme will be posted. Any blogger that wishes to participate is invited to write a post on the chosen topic. The event is called “T-SQL Tuesday,” but any post that is related to both SQL Server and the theme is fair game. So feel free to post about SSIS, SSRS, Java integration, or whatever other technologies you’re working with in conjunction with SQL Server. Even if your post includes no T-SQL, we still want to see it.

APPLY Knowledge

Recently on Twitter, I heard the claim that “If you don’t understand the APPLY operator, your skills are somewhere around the 50th percentile at best.” While I believe that Adam was giving a warning to self-proclaimed experts (possibly one he might have been interviewing at the time…), I also believe that we could take it as a challenge as a T-SQL blogging community to learn more about APPLY and the ways in which we can use it in our work.

Please share how you use this wonderful feature. Maybe you know how APPLY works inside and out? Perhaps you’ve got a fantastic user defined function (UDF) to share? Or maybe your experience revolves around using Dynamic Management Functions (DMFs) in your never-ending quest for SQL Server performance? Let the community know as it is time to study!

Rules of Engagement

  1. Your post must be published between 00:00 GMT Tuesday, April 12, 2011, and 00:00 GMT Wednesday, April 13, 2011.
  2. Your post must begin with the T-SQL Tuesday logo, and it must be linked back to this blog post.
  3. Make sure that you’re represented in the round-up by leaving a comment below with a link back to your post. Trackbacks should work, but I’m not going to work to find your post if they don’t.

Make it a Success!

  1. Reference T-SQL Tuesday in your post’s title!
  2. Tweet about your newly minted post on Twitter using the #tsql2sday hashtag!
  3. Let Adam Machanic know that you want to host T-SQL Tuesday! You have to have paticipated twice and blog regularly to qualify.
Standard

43 thoughts on “Invitation to T-SQL Tuesday #17 – APPLY Knowledge

  1. >>“Unless you’re using APPLY, your T-SQL skills are only moderate at best.”

    So performing row by row operations with TSQL means I’ve exceeded moderate coding abilities in it?

    I’d be very interested to find out who the person that stated that was and exactly what they meant or in what context/situation it was meant to be said in.

    • Matt says:

      Yeah, it was definitely a stark challenge. I honestly can’t remember who said it, but it was Twitter, so it’s even possible that I imagined it from a mash up of tweets together in my TweetDeck.

      • Adam Machanic said it, and the context was not that you should be using it to perform row by row operations all the time, but that it is a powerful tool in T-SQL and you ought to be aware of it.

  2. :) Cool. should be fun to come up with some interesting use cases and examples (and throw in there performance pros/cons)

    Thanks for hosting. Takes a lot of work and much respect

    • Matt says:

      Heh, a friend pointed me to the source and I’ve revised the story a little bit. Nice to know that my memory is completely failing me at this point. ;-)

  3. Pingback: @mvelic opens Invitation to T-SQL Tuesday #17 – APPLY Knowledge #tsql2sday | sqlmashup

  4. Matt, fantastic topic!!! I hope I’ll have time to write a post; you’ve caught me right in the middle of my Who is Active documentation series so I’m a bit busy. But obviously this topic is quite near and dear.

    Ted, I’m the source of the quote in question, and I stand by it 1000%. In my opinion APPLY opens the door to a huge number of options, both in terms of elegant expression and query performance. I also like to ask about APPLY in interviews, especially when talking to people who have years of experience. It’s a good way to gauge how well they keep up with newer enhancements. But you’re free to disagree with all of this, and I look forward to your post on why APPLY equates to row-by-row processing (and why that’s a bad thing, if I’ve properly caught your implication).

  5. Hey Adam, No, the context was completely off from that. Knowing it is important and agree that knowing APPLY and when going to a level you seem to be with T-SQL, everything should be applied for knowledge. My reference is, just because you don’t use it for something doesn’t mean you are less of a developer with T-SQL. So I think a better way to state it is, “Unless you know APPLY and how it can be used, your T-SQL skills are only moderate at best.”

  6. Pingback: T-SQL Tuesday Reminder – Coming next week « Voice of the DBA

  7. Pingback: T-SQL Tuesday #17: Using Apply to Demystify Deadlocks | SQLSoldier

  8. Pingback: T-SQL Tuesday #017 – APPLY | Luke Hayler - SQL Server Developer

  9. Pingback: Rob Farley : SELECT and WHERE, but no FROM clause

  10. Pingback: T-SQL Tuesday#17: It’s all about APPLYcation this time « TroubleshootingSQL

  11. Pingback: SQL SERVER – Query to Recent Query on Server with Exeuction Plan Function to Get SQL « Journey to SQLAuthority

  12. Pingback: JimMcLeod.Net » T-SQL Tuesday #17–APPLY in Compatibility 80

  13. Pingback: T-SQL Tuesday #17: Applying APPLY | Bob Pusateri - The Outer Join

  14. Pingback: T-SQL Tuesday #17: Using APPLY | Art of the DBA

    • Great post Brad! Enjoyment received and sorry I missed your previous posts during the research phase. The blog title confused the search engine and myself ;-)

      Take away, search by “apply operator” next time.

  15. Pingback: T-SQL Tuesday #17–APPLY « DataReader

  16. Pingback: T-SQL Tuesday #17 – APPLYing Yourself to T-SQL « Voice of the DBA

  17. Pingback: T-SQL Tuesday #18 – My CTE « Voice of the DBA

  18. Pingback: T-SQL Tuesday #17 Roundup - APPLY Knowledge | Matt Velic

  19. Pingback: TSQL Tuesday #026 – Second Chances | Dave's SQL Blog

  20. Pingback: Rob Farley : APPLY – not exactly set-based

  21. Pingback: T-SQL Tuesday #026 – The Wrap Up | Dave's SQL Blog

  22. Pingback: T-SQL Tuesday Topics – Febuary 2012 « Voice of the DBA

  23. Pingback: #Meme15 Meets #T-SQL Tuesday « Chris Shaw's Weblog

  24. Pingback: T-SQL Tuesday Topics – December 2012 Update « Voice of the DBA

Comments are closed.