New statistics

  • Comments posted to this topic are about the item New statistics

  • Good question, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Hi Steve,

    I trapped into the pitfall and didn't see that the last query was not using any predicate 🙂

    If you use a query with a predicate it will create a statistics object automatically (in your scenario)

    Microsoft Certified Master: SQL Server 2008
    MVP - Data Platform (2013 - ...)
    my blog: http://www.sqlmaster.de (german only!)

  • Hush! That's probably for an upcoming QotD...


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

  • Also if you have case sensitive collation, you spell ages with both uppercase letter and lowercase letter. That would also return 0 rows.

  • Good catch. I never run case sensitive, but edited the question.

  • The explanation is somewhat broken - it says that if you query the table you will generate stats data. Well, you did query the table, and you didn't generate any stats data.  The explanation should say that to make stats data by querying the table you have to have some meaningful condition in your query.

    But I didn't know that, so I've learnt something from the question anyway.

    Tom

Viewing 7 posts - 1 through 6 (of 6 total)

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