• Based on the information we have so far it's almost impossible to help...

    There are many possinle issues causing the bad performance:

    [SET GUESSING ON]

    1) poor database design (why are there 3-5 tables for 300-500 persons?)

    2) poor query desgin (is that "subquery" for day 1-30 actually within some sort of a loop?)

    3) missing indexes to support the query (if performance drops over time it seems like there are some indexes missing)

    4) missing archiving method (if there are data in that table that aren't used frequently, it might help to move those data into an archive table or even archive db)

    [SET GUESSING OFF]

    Please see the 2nd link in my signature onhow to post performance issues. The more info you provide, the better we can help.



    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]