Advanced ranking function

  • Jason A. Long (5/29/2015)


    Great... More missing posts... :crazy:

    If anyone w/ admin privileges can find my last post on this thread (index test w/ results), please de-spam it... Because, I'm not rewriting it...

    I can see it but I can't copy it or anything. I'll report it to the powers that be.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I'll also asked then if there were a way to hide you from the automatic spam-delete and to restore your other previously deleted posts.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks Jeff - I appreciate your help. I just wish I knew what I'm doing to trigger the spam detector...

    It doesn't like 2 posts from the same poster, back to back, within a short time frame?... Maybe? :ermm:

  • Nah... I think it's because you're a relative newbie to SSC and anything with an outside link is getting squashed. Of course, that didn't work on that bloody super-busy spammer this evening. :blink:

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Finally it looks like your posts are back Jason, and good job on the sample and test code. The addition of the index does remove the primary sort but optimizer incorporates a sort operator (as usual) for the gathering of the parallel streams as it considers the operation costly enough to go for a parallel plan. Rounding up the IO and CPU, the ration between the two solutions is close to 85/15. The downside is that the results my solution isn't correct although I feel it wouldn't take much to correct it, I just don't have the time at the moment.

    😎

  • Jason A. Long (5/29/2015)


    j-1064772 (5/29/2015)


    Eirikur Eiriksson (5/25/2015)


    Luis Cazares (5/25/2015)


    This might be simpler to understand.

    ...has only one sort operator which can be eliminated with a single index...

    [font="Comic Sans MS"]Sinking feeling of reverting back to newbie status - I cannot make heads or tail of that last statement. Can you help by expanding a bit on this topic ?

    Regards[/font]

    Eirikur is simply pointing out [snip]

    Thanks for the explanation. Not (yet) comfortable with understanding execution plans, I could not see where the "sort operator" came from in the first place.

Viewing 6 posts - 16 through 20 (of 20 total)

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