Self-numbered primary key creation

  • Comments posted to this topic are about the item Self-numbered primary key creation

  • I'm sorry, but I just don't understand what is being asked here.


    Just because you're right doesn't mean everybody else is wrong.

  • The wording is confusing, but I believe the question is trying to ask:

    "Given that SQL Server creates statistics for a primary key upon its creation, what will be the state of the histogram for the statistics of the primary key column above?"

    1 - The histogram is fully created and populated with the distribution of the data in the table

    2 - The statistics will be created, but without any histogram distribution details

  • Just to be sure... the CTE's that generate the sequence in the code are NOT "recursive" CTEs.  They're "cascading" CTE's and there's a huge difference in both performance and resource usage.

    --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 4 posts - 1 through 3 (of 3 total)

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