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 » indexing   (RSS)
Showing page 1 of 3 (27 total posts)
  • Scans are better than Seeks. Really.

    There are quite a few reasons why an Index Scan is better than an Index Seek in the world of SQL Server. And yet we see lots of advice saying that Scans are bad and Seeks are good. Let’s explore why. Michael Swart (@MJSwart) is hosting T-SQL Tuesday this month, and wants people to argue against a popular opinion. Those who know me and have heard ...
    Posted to Rob Farley (Weblog) by rob_farley on March 11, 2014
  • Parameterization and filtered indexes (part 2)

    In my previous post, I demonstrated how the presence of a filtered index can get in the way of successful parameterization, possibly resulting in too much query compilations and procedure cache bloat. I suggest reading that first, because I will go straight where I left off.   Use the Force, Luke   If you read the previous post very ...
  • 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
  • Joins in single-table queries

    Tables are only metadata. They don’t store data. I’ve written something about this before, but I want to take a viewpoint of this idea around the topic of joins, especially since it’s the topic for T-SQL Tuesday this month. Hosted this time by Sebastian Meine (@sqlity), who has a whole series on joins this month. Good for him – it’s a great ...
    Posted to Rob Farley (Weblog) by rob_farley on December 10, 2012
  • Bleeding Edge 2012 – session material

    As promised, here are the slide deck and demo code I used for my presentation at the Bleeding Edge 2012 conference in Laško, Slovenia. Okay, I promised to have them up by Tuesday or Wednesday at worst, and it is now Saturday – my apologies for the delay. Thanks again to all the attendees of my session. I hope you enjoyed it, and if you have any ...
  • Slides and demo code for Columnstore Index session

    Almost a week has passed after SQLBits X in London, so I guess it’s about time for me to share the slides and demo code of my session on columnstore indexes. After all, I promised people I would do that – especially when I found out that I had enough demos prepared to fill two sessions! I made some changes to the demo code. I added extra ...
  • Busy months ahead

    Almost two months have passed since my last blog post. And while it’s true that I’ve had (much) longer breaks, I do have a good reason now. All the time that I would normally at least in part spend on preparing new blog posts is now reserved for preparing presentations for a few upcoming events. I’ll give you an overview – who knows, maybe you’ll ...
  • 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
1 2 3 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement