THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Michael Zilberstein

How do we know that Microsoft conducts performance tests?

We know it from comments in system procedure's code. Here is what I've found while digging for some undocumented stuff about statistics:

-- I don't like this copy&paste stuff, but here it boosts performance by 50%

You can find it too - in sys.sp_table_statistics2_rowset procedure. It returns first 2 parts of DBCC SHOW_STATISTICS result (stat header and density vector) in table format. The procedure header is:

EXEC sys.sp_table_statistics2_rowset
    @table_name = ?, --  sysname
    @table_schema = ?, --  sysname
    @table_catalog = ?, --  sysname
    @stat_name = ?, --  sysname
    @stat_schema = ?, --  sysname
    @stat_catalog = ? --  sysname

If you supply only @table_name and @stat_name, you'll receive the same output as from undocumented (I think) syntax of DBCC SHOW_STATISTICS:


Published Monday, March 24, 2008 11:31 AM by Michael Zilberstein


No Comments
New Comments to this post are disabled
Privacy Statement