Forum Replies Created

Viewing 15 posts - 226 through 240 (of 429 total)

  • RE: Bad performance of a query

    Thank you. I will run the update statistics with a full scan and then try changing the code as you suggested a while earlier and then will post the code...

  • RE: Bad performance of a query

    weitzera (8/24/2011)


    Yeah, even though the indexes you modified now cover the output of the index scan on orders, they don't cover all the possible combinations of predicates. For example,...

  • RE: Bad performance of a query

    Here is the plan. Please let me know if you see anything that can be improved at DBA end.

  • RE: Bad performance of a query

    Nils Gustav Stråbø (8/24/2011)


    My guess is that your proc still behaves poorly.

    The reason is the massive WHERE clause which is trying to use short-circuiting, but this usually doesn't work in...

  • RE: Bad performance of a query

    weitzera (8/23/2011)


    On or around line 287 you have a bunch of subqueries selecting counts from the @ipOrderStatusCodes with no outer references (meaning the subquery does not reference anything in the...

  • RE: Bad performance of a query

    Thank you. I will make the changes tomorrow morning as its 1 am here and i am finding it hard to concentrate now. Will post the plan as soon as...

  • RE: Bad performance of a query

    weitzera (8/23/2011)


    I'm not certain this will help in your case, but I noticed that you have a variable named @ipOrderGuid which is declared as a varchar(max)

    You might try changing the...

  • RE: Bad performance of a query

    Thanks to both of you. I will learn with the examples you provided and try to implement an inline function.

    Meanwhi8le, the function was being used to display 'dispatchstatus'. To...

  • RE: Bad performance of a query

    The view itself is nasty:

    SELECT

    b.CarrierCode,b.Descr as CarrierDescr, a.Comment, a.InternalCmt, RTRIM(e.CustName) as CustName, e.CustNum, a.DeliveryDate, Year(a.DeliveryDate) as DeliveryYear, a.InvDate,

    a.InvoiceAmt, a.OrderID, a.OrderStatus, a.Po...

  • RE: Bad performance of a query

    Nils Gustav Stråbø (8/23/2011)


    Its probably in the view vw_D1OrderHeader.

    Yes. you were faster enough to leave me behind in editing my post. It is indeed the part of the view. What...

  • RE: Bad performance of a query

    I found the operator from the plan which you talked about. As per your remark, this function is getting executed 85k+ times. Not sure, how to avoid this.

    Can you...

  • RE: Bad performance of a query

    thank you both. I am trying to figure out the compute scalar operator among so many operators, so meanwhile I am attaching the schema for the procedure which I never...

  • RE: Bad performance of a query

    Nils Gustav Stråbø (8/23/2011)


    chandan_jha18 (8/22/2011)


    Nils Gustav Stråbø (8/22/2011)


    Start by removing the scalar function. Does it run any faster/less reads? If so, try to rewrite the scalar function to a inline...

  • RE: Bad performance of a query

    Nils Gustav Stråbø (8/22/2011)


    dbo.fn_GetDispatchStatus

    Did it look costly to you? I mean we can write something better here but can we find some way to reduce so much of execution time.

    thanks

  • RE: Bad performance of a query

    Nils Gustav Stråbø (8/22/2011)


    Start by removing the scalar function. Does it run any faster/less reads? If so, try to rewrite the scalar function to a inline table valued function.

    Which scalar...

Viewing 15 posts - 226 through 240 (of 429 total)