Categories
T-SQL Tuesday

T-SQL Tuesday #200 – It’s Bad If I See…

For the bicentennial edition of T-SQL Tuesday, Brent has thrown down the topic of “When I’m looking at a query, I bet it’s bad if I see ____.”. I’m expecting the Brits out in force for this game of Blankety Blank. There are some things which terrify me when troubleshooting: Not necessarily in that order. But there’s […]

Categories
SQL

Performance Considerations using APPLY

In the previous post we looked at how to use the CROSS APPLY and OUTER APPLY operators as alternative to a JOIN in queries with some examples. As we wrapped that up I also mentioned that there can be drawbacks to using APPLY in our queries, particularly when we’re working with large data sets. The issue is due to the way that the right hand […]

Categories
SQL

Using Cross Apply and Outer Apply

When joining data in SQL we have a number of options to us including INNER and OUTER joins, but one of the ones I tend to use less frequently is the APPLY operator, specifically the CROSS APPLY and OUTER APPLY operators. As with other types of joins they operate slightly differently and have considerations which should be taken into account when deciding on the output […]