Browse by Tags

All Tags » teched » sql
  • Ordered data requires ORDER BY

    When you select data out of a database table, it might seem as if the system will give you data in the order of the clustered index that is on that table (assuming it has one), but this isn't quite right. I showed this in the fifth of my T-SQL tips at TechEd Australia this year. If you don't explicitly order data using the ORDER BY ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on November 16, 2008
  • Unique Indexes with GROUP BY

    Indexes are great, but if you don't understand the significance of unique indexes, then you're potentially missing out on some decent performance gains. I've been meaning to write this blog post for a long time. This is material that I've been teaching and presenting about all year, but somehow it's never turned into a blog ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on November 9, 2008
  • JOIN simplification in SQL Server

    This is another of my tips/techniques that I demonstrated recently. It is not a new SQL Server 2008 feature - it works just fine in older versions - I demonstrated it running on SQL Server 2005 but using SQL Server 2008 Management Studio. When you have a single-table query and then introduce a JOIN, there are a number of ways in which that JOIN ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on November 9, 2008
  • Doing the maths to understand SQL optimiser choices

    The second of my tips from my talk (slides and scripts available) was about doing the maths to understand why the SQL Server optimiser behaves in the way that it does - particularly in relation to choosing whether to scan an index/heap, or whether to seek a less-suitable index for some of the data and then do a lookup to fetch the rest. This ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on October 12, 2008
  • OUTPUT clause - knowing what goes in, and what you've accidentally taken out

    The OUTPUT clause has to be one of the best T-SQL features out there. It was new in SQL Server 2005, but it's still remarkably little known. I guess like many of the features that were introduced in SQL 2005, many people just make do with the way they did things before. The basic point of the OUTPUT clause is to turn a data modification ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on October 4, 2008
  • Improving Your T-SQL Arsenal - slides

    I've given this presentation a couple of times at user-groups now - last week in Adelaide, and this week in Melbourne. I posted the scripts to my blog recently, making them available to people who heard this talk at TechEd Australia at the start of the month, so now I've got around to uploading the slide deck as well. I actually plan to ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on September 18, 2008
  • DAT283

    TechEd AU this week. I'm giving a talk on "T-SQL Tips n Techniques: Improving Your T-SQL Arsenal" on Friday morning. The slides are available from CommNet for people registered, but the scripts are here as well. Come along to the talk to see how I use the scripts, but do grab these if you want to be trying them out on your data while ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on September 3, 2008
  • Code Camps galore

    We all know that Adelaide hosted Code Camp SA recently - it was a great success, and some people even wished I was there! TechEd is coming up of course, but now there are two code camps scheduled for October, on the same weekend (13-14) and at the same venue! Yes, that place is Wagga Wagga - one Wagga for each event. Firstly, and most ...
    Posted to SQL Server Aggregator (Weblog) by Anonymous on July 21, 2007