How can we need to remove Table Stats Warning on Table Varibale ..

  • How can we need to remove Table Stats Warning on Table Varibale ..

  • Where and how are you gettig this error?

  • I am confused since table variables doesn't have statistics.


    N 56°04'39.16"
    E 12°55'05.25"

  • Ditto.

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

  • John Paul (7/23/2009)


    How can we need to remove Table Stats Warning on Table Varibale ..

    Even though SQL Server does not support column statistics on table variables, that doesn't stop it from warning you about the lack of statistics in a graphical query plan. That said, I haven't seen a missing statistics warning on a table variable since SQL 2K days.

    Some people regard this as a bug (which may or may not be 'fixed' now), others find it useful since it indicates that a temporary table (which does support statistics) might be a better choice...if the statistics would be useful in producing a better plan.

    In any case, the only way to avoid the warning would be not to use a table variable. There isn't enough information in your original post to say whether one is to be preferred over the other.

    Paul

Viewing 5 posts - 1 through 4 (of 4 total)

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