Forum Replies Created

Viewing 15 posts - 15,976 through 15,990 (of 59,067 total)

  • RE: Deadlock Problem on a Heap Table

    TheSQLGuru (12/30/2016)


    Jeff Moden (12/30/2016)


    TheSQLGuru (12/30/2016)


    Jeff: "Another potentially very serious problem with all of this is the idea that a lot of the rows will suffer a lot of updates. "

    ...

    --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)

  • RE: Where to place WITH (NOLOCK) ?

    I'd be very cautious about recommending the use of SNAPSHOT ISOLATION... very cautious. As with any such major feature, there are major caveats.

    Kendra Little wrote a nice 60,000 foot...

    --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)

  • RE: Where to place WITH (NOLOCK) ?

    BOR15K (12/30/2016)


    Thank you Jeff,

    But I think we have drifted way beyond my original question of where to place WITH (NOLOCK).

    With regards to your concern it might always select a same...

    --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)

  • RE: Deadlock Problem on a Heap Table

    lmarkum (12/30/2016)


    Jeff Moden (12/30/2016)


    lmarkum (12/30/2016)


    like are the TrackingNumber values always going to be ever-increasing

    You should be able to easily figure that out on your own because you have an IDENTITY...

    --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)

  • RE: Find Median

    kaladharreddy15 (12/30/2016)


    Thanks, Actually I have single column in table, need to find median on that column, I may have count odd and even, Please help me on this

    The code that...

    --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)

  • RE: sa password is lost - need to add Sys Admin Privileges to another account

    Lowell (12/29/2016)


    if you are a local admin on the server, there is a technique using powershell to impersonate the service account running SQL, and add logins, and then add that...

    --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)

  • RE: What Will 2017 Bring?

    Charles Kincaid (12/30/2016)


    The developers worked for the testers.

    Ooooo... now there's an idea! Add DBAs and PMs into that, as well. Heh... especially if the testers also wrote their/our...

    --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)

  • RE: What Will 2017 Bring?

    djackson 22568 (12/30/2016)


    How can we expect that when companies are outsourcing work and putting Americans out of work?

    + 1 Billion.

    --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)

  • RE: What Will 2017 Bring?

    Addressing the base issues, yes, Data Analysis and Data Science are important. They always have been and that's a part of the reason why supposed BI (which I consider...

    --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)

  • RE: Where to place WITH (NOLOCK) ?

    BOR15K (12/30/2016)


    Jeff Moden (12/30/2016)


    BOR15K (12/30/2016)


    With regards to the TOP 1 I appreciate it might sound weird, but this what the customer require - to fetch the first value, disregarding the...

    --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)

  • RE: Where to place WITH (NOLOCK) ?

    BOR15K (12/30/2016)


    With regards to the TOP 1 I appreciate it might sound weird, but this what the customer require - to fetch the first value, disregarding the order, therefore there...

    --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)

  • RE: Deadlock Problem on a Heap Table

    TheSQLGuru (12/30/2016)


    Jeff: "Another potentially very serious problem with all of this is the idea that a lot of the rows will suffer a lot of updates. "

    That...

    --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)

  • RE: Deadlock Problem on a Heap Table

    lmarkum (12/30/2016)


    like are the TrackingNumber values always going to be ever-increasing

    You should be able to easily figure that out on your own because you have an IDENTITY column. Sort...

    --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)

  • RE: Find Median

    Yes. I'm running 2008 (non r2) on my laptop and nothing else was going on at the time. The first of your queries took 3 seconds, the second...

    --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)

  • RE: Find Median

    Luis Cazares (12/30/2016)


    It's PERCENTILE_DISC or PERCENTILE_CONT which use OVER to define window and order.

    The median is the first example on the BOL page:

    https://msdn.microsoft.com/en-us/library/hh231327.aspx

    Very cool. Thanks.

    On the two code examples...

    --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)

Viewing 15 posts - 15,976 through 15,990 (of 59,067 total)