executing a single query in parallel

  •  

    Hi,

    i am executing a query which results in millions of records.so its taking a lot of time.

    Can we execute the same query parallely and can get different reselt set of that query at the same time. 

    if there any solution for this, plz help me to get out of this problem.

     

  • that's an interesting question being as most people are usually asking for the reverse.

    Firstly I assume you are running on a multi proc box ? otherwise the answer is no!

    The only way to force parallelism I can think of is to lower the cost theshold in server properties/processor. The only other Q is how do you know it is not using parallel op.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Take a look at the OPTION clause for SELECT in BOL.  If you have a multiprocessor system you can 'suggest' MAXDOP.

    If the issue is getting something into the resultset, even though the query has not quite completed, so that there is data to 'see', you might try the FAST option.

    Neither of the above are exactly ANSI standard...

    Another and possibly much better solution is to examine the query and attempt to improve its performance by simplifying, optimizing, etc.  Also examine the indexes that are present and whether there are additional indexes or changes to existing indexes that might help.

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

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