Professional Web Applications Themes

Statistics - Microsoft SQL / MS SQL Server

Hi, Is there any system table in which the statistics for the columns of a table are stored? I have read that the statblob column of the sysindexes table contains statistical information, but what about the statistics stored for columns that do not have index? are those statistics also stored in the sysindex table? Thanks in advance....

  1. #1

    Default Statistics

    Hi,
    Is there any system table in which the statistics for the columns of a table
    are stored?
    I have read that the statblob column of the sysindexes table contains
    statistical information, but what about the statistics stored for columns
    that do not have index? are those statistics also stored in the sysindex
    table?

    Thanks in advance.


    TS Guest

  2. #2

    Default Re: Statistics

    TS

    Yes, all statistics are stored in the sysindexes table.
    If you run this query, you may see that some of the rows represent auto
    generated statistics. Their name in the first column will start with
    _WA_sys, and they will have no rows and no data pages (dpages), but they
    will have something non-null in the statblob column.

    select name, object_name(id), rows, dpages, statblob
    from sysindexes

    --
    HTH
    ----------------
    Kalen Delaney
    SQL Server MVP
    www.SolidQualityLearning.com


    "TS" <ch> wrote in message
    news:#phx.gbl... 
    table 


    Kalen Guest

  3. #3

    Default Re: Statistics

    TS (ch) writes: 

    Yes. They usally have names like _WA_xx, if they are auto-created.
    You can use the function indexproperty() to find out whether an entry
    in sysindexes is an actual index, or just statistics.


    --
    Erland Sommarskog, SQL Server MVP, se

    Books Online for SQL Server SP3 at
    http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
    Erland Guest

  4. #4

    Default Re: Statistics

    Hi,
    Could anyone give some insight on selection of columns for statistics.
    What are the basis on which one would use CREATE STATISTICS?
    What are the selection criteria for an user to decide
    which tables/columns etc. to select for statistics
    (assuming that we want to create the statistics ourselves without
    considering the auto statistics created by Sql Server)?

    Thanks in advance




    TS Guest

Similar Threads

  1. Track statistics
    By lilbuckeye in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: June 23rd, 11:42 AM
  2. web statistics...
    By Bill in forum Macromedia Flash Sitedesign
    Replies: 4
    Last Post: December 27th, 02:47 PM
  3. Statistics::ChiSquare
    By David Cantrell in forum PERL Modules
    Replies: 0
    Last Post: October 29th, 08:51 PM
  4. UPDATE STATISTICS
    By Thomas J. Girsch in forum Informix
    Replies: 10
    Last Post: August 24th, 12:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139