Query Performance

  • I had a table with 16 million records.Having good indexes and fragmentation. Hardware is good to support any query. But some queries taking lot off time. I had primary key defined on the table. When ever i execute any query it is going to keyloopup. Even i had added covering indexes, the keylookup is happening with clustered index. So, the data retrival is very slow. What i need to do avoid keylookup and retrive my data faster?

  • Without knowing the structure of your database or your query, we can't answer that question. Performance depends on too many things for us to blindly say "XYZ".

    Post your query with some sample data and a mock setup of the table(s) and indexes in question.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • I agree with Brandie.

    I will add this though, if your index was truly covering, and the one used by the execution plan, you shouldn't get a key lookup. So it's either the wrong index, or it's not covering.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey (4/30/2010)


    I agree with Brandie.

    I will add this though, if your index was truly covering, and the one used by the execution plan, you shouldn't get a key lookup. So it's either the wrong index, or it's not covering.

    Well said Grant, That solved one of my issues too.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply