Microsoft SQL Server 2014 Query Tuning & Optimization (Database & ERP - OMG) by Benjamin Nevarez
Author:Benjamin Nevarez [Nevarez, Benjamin]
Language: eng
Format: azw3
Publisher: McGraw-Hill Education
Published: 2014-10-10T04:00:00+00:00
Inspecting Statistics Objects
Let’s look at an example of a statistics object and inspect the data it stores. But first make sure you are using the new cardinality estimator by running the following statement:
Existing statistics for a specific object can be displayed using the sys.stats catalog view, as used in the following query:
An output similar to the following (edited to fit the page) will be shown:
One record for each statistics object is shown. You can use the DBCC SHOW_STATISTICS statement to display the details of a statistics object by specifying the column name or the name of the statistics object.
For example, run the following statement to verify that there are no statistics on the UnitPrice column of the Sales.SalesOrderDetail table:
DBCC SHOW_STATISTICS (‘Sales.SalesOrderDetail’, UnitPrice)
If no statistics object exists, which is the case for a fresh installation of the AdventureWorks2012 database, you will receive the following error message:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12568)
Hello! Python by Anthony Briggs(9912)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8295)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7762)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7052)
Microservices with Go by Alexander Shuiskov(6816)
Practical Design Patterns for Java Developers by Miroslav Wengner(6731)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6674)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Angular Projects - Third Edition by Aristeidis Bampakos(6079)
The Art of Crafting User Stories by The Art of Crafting User Stories(5607)
NetSuite for Consultants - Second Edition by Peter Ries(5546)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5346)
Kotlin in Action by Dmitry Jemerov(5062)
