• rahulpatel112 (10/4/2010)


    I am facing problem since last 5-6 month in sql server in query executing it takes 10-12 mins to execute even if database is on local pc.

    I want to decrease it and want to make it execte withing 30-40 sec..

    It is getting data of whole month with subquery of 1-30 date and each joining 3-5 tables for 300-500 persons.

    so any ideas....

    One thing that i can do some process in background and insert fetched data to the some other table and at the time of executing above query fetch data from that table.

    if its possible then how can i do it?Is there any other way to solve this problem?

    Welcome to the wonderful world of troubleshooting.

    Have you taken a look at execution plan and compare it with available indexes?

    Have you traced the query so to know where time is spend?

    As alreary pointed out by previous poster provided information is generic, you have either to figure it out what the problem is or provide info enough for somebody to help.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.