THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » sql » performance   (RSS)
Showing page 1 of 2 (16 total posts)
  • String length and SARGability

    CONVERT_IMPLICIT isn’t the only problem with getting data types wrong. You might have the right type, but what if the length is wrong? This post will look at both getting the type wrong and getting the length wrong too. Let’s do some testing. We’ll need a table with indexes. I’d normally use one of the AdventureWorks versions for this, but as ...
    Posted to Rob Farley (Weblog) by rob_farley on September 22, 2013
  • Ultimate query tuning

    Infinitely better. 100% of the reads removed. Roughly 4000 (okay, 3890), down to zero. None. Let me explain... Obviously if there’s data being returned, there are reads needed. And obviously there is some CPU needed for SQL to be given a query and do anything at all. Luckily for me, performance of a query is typically evaluated using the ...
    Posted to Rob Farley (Weblog) by rob_farley on August 19, 2013
  • The SQL Query Optimizer – when Logical Order can get it wrong

    It’s very easy to get in the habit of imagining the way that a query should work based on the Logical Order of query processing – the idea that the FROM clause gets evaluated first, followed by the WHERE clause, GROUP BY, and so on – finally ending with whatever is in the SELECT clause. We even get in the habit of creating indexes that focus on ...
    Posted to Rob Farley (Weblog) by rob_farley on December 30, 2012
  • When is a SQL function not a function?

    Should SQL Server even have functions? (Oh yeah – this is a T-SQL Tuesday post, hosted this month by Brad Schulz) Functions serve an important part of programming, in almost any language. A function is a piece of code that is designed to return something, as opposed to a piece of code which isn’t designed to return anything (which is known as a ...
    Posted to Rob Farley (Weblog) by rob_farley on November 7, 2011
  • Joins without JOIN

    I’m now doing two sessions at the SQL Saturday event in Portland. I had been scheduled to do a single session (on indexes), but got an email yesterday asking if I could do another one as well. So now I’m going to do a session earlier in the day about Joins. Yes, JOINs. Nice co-incidence to find that this month’s T-SQL Tuesday, hosted by Stuart ...
    Posted to Rob Farley (Weblog) by rob_farley on October 3, 2011
  • My biggest recommendation for people learning T-SQL

    It’s not quite a Best Practice, but it’s something that I see as very important. It makes the difference between someone who might be quite good at T-SQL, and someone who can go past the rest and become one of those people who get asked to solve other people’s T-SQL problems. It’s easy – you read the plans. You see, the plans explain to you ...
    Posted to Rob Farley (Weblog) by rob_farley on July 11, 2011
  • Covering, schmuvvering – when a covering index is actually rubbish

    Take a look at this query plan. Yes, that arrow indicates a single row. This is an Index Seek, returning a single row. And yet it’s rubbish. That’s right – it’s rubbish! In fact, I had to provide a hint for it to use this index. A table scan would’ve been better, and this is what happens without the index hint. Let’s look at the query. I ...
    Posted to Rob Farley (Weblog) by rob_farley on May 19, 2011
  • Function Invertability for SARGability

    My good friend Simon Sabin used the term ‘invertability’ on a Connect item he logged today. Essentially, Simon’s noticed that there are lots of people that use year(someDate), but that the system doesn’t understand that this function doesn’t affect the order of the items in the index. month(someDate) does, but if you’re already using ...
    Posted to Rob Farley (Weblog) by rob_farley on March 23, 2011
  • Probe Residual when you have a Hash Match – a hidden cost in execution plans

    No, this post has nothing to do with airport security, and nothing to do with marijuana. Being honest, this post is only half about Hash Matches and Probe Residuals. It’s more about the types of predicates you can see mentioned in a SQL Server Execution Plan (or Query Plan, but I prefer to call them Execution Plans) – but you may well see some ...
    Posted to Rob Farley (Weblog) by rob_farley on March 21, 2011
  • The blocking nature of aggregates

    I wrote a post recently about how query tuning isn’t just about how quickly the query runs – that if you have something (such as SSIS) that is consuming your data (and probably introducing a bottleneck), then it might be more important to have a query which focuses on getting the first bit of data out. You can read that post here.  In ...
    Posted to Rob Farley (Weblog) by rob_farley on March 7, 2011
1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement