Forum Replies Created

Viewing 15 posts - 76 through 90 (of 130 total)

  • RE: Help on Performance issue on Recursive CTE

    mister.magoo (10/11/2012)


    And the statistics???

    MM,

    I updated last post with attachments now.

    Thanks

  • RE: Help on Performance issue on Recursive CTE

    mister.magoo (10/11/2012)


    Thanks for the plan, but that seems to be an estimated plan, not an actual plan?

    Can you produce a plan from an actual execution please?

    And also include SET STATISTICS_TIME...

  • RE: Optimize query needed

    bteraberry (10/2/2012)


    I'm not sure how logical this project is, but it seemed interesting to do this without looping. It was fun.

    declare @b-2 bigint = 31;

    declare @out varbinary(128)...

  • RE: Help on Performance issue on Recursive CTE

    mister.magoo (10/11/2012)


    haiao2000 (10/10/2012)


    I really appreciate that you spend time write up this great post. I am still trying to understand how your code works myself :-).

    The part I don't understand...

  • RE: Help on Performance issue on Recursive CTE

    ChrisM@home (10/11/2012)


    haiao2000 (10/10/2012)


    ...

    whatelse could i do to make this query perform better. this thing runs for about 20seconds on the table that contains more than 10 millions of records, which...

  • RE: Find sub-tree nodes

    Jeff Moden (10/10/2012)


    Just an update. I'm still workig the angles on the multiple parent thing. If you don't have any "cycles" in the data, this all might just...

  • RE: Help on Performance issue on Recursive CTE

    mister.magoo (10/10/2012)


    Hi there, I would like to offer you my own twist on this using the "identity hack".

    The outline of the logic is to replace the recusive cte with a...

  • RE: Help on Performance issue on Recursive CTE

    XMLSQLNinja (10/10/2012)


    haiao2000 (10/10/2012)


    XMLSQLNinja (10/10/2012)


    You should post the actual DDL.

    From what I see you could make this faster using the Local Updateable Variable approach (e.g. the 'Quirky Update')... See

  • RE: Help on Performance issue on Recursive CTE

    XMLSQLNinja (10/10/2012)


    You should post the actual DDL.

    From what I see you could make this faster using the Local Updateable Variable approach (e.g. the 'Quirky Update')... See http://www.sqlservercentral.com/articles/T-SQL/68467/

    Alen,

    I...

  • RE: Find sub-tree nodes

    Look like I figured out the way to calculate Materialized path programatically, the issue I am dealing with now is how to handle objects that have more than one parents.

    ALTER...

  • RE: Find sub-tree nodes

    Jeff Moden (10/8/2012)


    Still missing some information...

    1. How often is the hierarchy updated? ---anser: It can be very often, daily, weekly

    2. How many total nodes are in the...

  • RE: Find sub-tree nodes

    Jeff Moden (10/8/2012)


    haiao2000 (10/4/2012)


    Mark-101232 (10/9/2007)


    Try this

    DECLARE @RootID INT

    SET @RootID=12;

    WITH CTE AS(

    SELECT GroupID,ParentGroupID

    FROM AframeGroup

    WHERE ParentGroupID=@RootID

    UNION ALL

    SELECT a.GroupID,a.ParentGroupID

    FROM AframeGroup a

    INNER JOIN CTE c ON c.GroupID=a.ParentGroupID)

    SELECT GroupID

    FROM CTE

    ORDER BY GroupID

    Eventually I run into...

  • RE: Find sub-tree nodes

    Sean Lange (10/4/2012)


    haiao2000 (10/4/2012)


    Eventually I run into performance issue when number records being so large. Could you suggest another method of doing tree drill down?

    Thanks!

    You do realize this thread is...

  • RE: CAN we?

    haiao2000 (10/4/2012)


    raghavender.2369 (10/4/2012)


    I agree with you, we can display the result in any desired format using convert or someother functions,

    my friend said it is possible to store date in this...

  • RE: CAN we?

    raghavender.2369 (10/4/2012)


    I agree with you, we can display the result in any desired format using convert or someother functions,

    my friend said it is possible to store date in this way...

Viewing 15 posts - 76 through 90 (of 130 total)