How to tuning large queries

  • Hi,

    I need to execute a query but it takes lot of time to execute.

    How can i decrease the exceution time.

  • There are several ways:

    approach one: optimization of the query itself (especially if it's not set based but so-called RBAR)

    approach two: proper index on the tables that support the query

    approach three: reevaluate the business requirement and verify it makes sense in the first place... 😉

    Those different paths can be combined.

    Edit: for details on how to ask performance question please see the following link:

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Check the execution plan and identify high cost operations and try to fix them.

    in the execution plan, Tabel Scan, Index Scan, Sort are the costly operations mostly




    My Blog: http://dineshasanka.spaces.live.com/

  • seppalapalli (2/6/2010)


    Hi,

    I need to execute a query but it takes lot of time to execute.

    How can i decrease the exceution time.

    Let me remote into your system and tune it for you! My rate is quite reasonable. 😀

    Seriously from your post you seem to have no idea where to even begin and expert tuners spend YEARS building their knowledge and skills. Hire someone and let them fix this code and give you some pointers about how to proceed at the same time. There are a KAJILLION things that can cause a query to perform slowly.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

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

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