SP taking lot of time.

  • Hi Expertz,

    I have an SP that when executed takes almost 20min to complete.

    When i checked my in syprocesses i found that a wait type of "CXPACKET" on 3 to 6 spid's....

    Will turning off parallelism help....

    Please help......

    Tanx 😀

  • So, have you tried setting MAXDOP to 1 on the query in your stored procedure? Did it help?

  • How long should the proc take to finish?

    I have some that take a few milliseconds, and some that take an hour or more, and none of them are "broken".

    You need to provide more information.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Anything slower than "instantaneous" is too damn slow, Gus 🙂

    Hey Eswin,

    (1) Please don't post to the "Problems Getting Worse" thread to call attention to your questions. That's not it's purpose. When we have time and inclination to be helpful, we check the lists for the various forums. Sticking an additional note over in the other thread again would be rude, and doesn't get you assistance any faster than normal. For that matter, neither does double-posting or adding URGENT URGENT URGENT to the title of your question.

    (2) Experts is spelled with an "s". Using a "z" doesn't make you look "L33t".

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • Lynn Pettis (8/5/2009)


    So, have you tried setting MAXDOP to 1 on the query in your stored procedure? Did it help?

    I couldn't try that as they wanted me to be sure that changing MAXDOP to 1 wont cause any other problems....

    Tanx 😀

  • GSquared (8/5/2009)


    How long should the proc take to finish?

    I have some that take a few milliseconds, and some that take an hour or more, and none of them are "broken".

    You need to provide more information.

    The Sp takes about 30 min to finish.

    This SP calls around five procedures when executed and the same Sp is called around 15 time for different set of data in a scheduled job....Will that cause parallelism.....

    I have asked them to for the query as soon i get will update it here...

    Tanx 😀

Viewing 6 posts - 1 through 5 (of 5 total)

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