Getting The Top Value Per Group In SQL Server: Row Number vs. Cross Apply Performance


There are many ways to express queries in SQL. How different rewrites perform will largely be a function of:

  • You not doing anything ridiculous
  • Queries having good indexes in place
  • The optimizer not seeing through your tricks and giving

Software Vendor Mistakes With SQL Server: Dealing With Bad Parameter Sniffing

Bad Wrap

When people hear the words “parameter sniffing”, there’s almost a universally bad reaction. They lose their minds and start raving about how to “fix” it.

  • Recompiling everything
  • Using optimize for unknown hints
  • Using local variables
  • Clearing the plan