Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server 2014 Development Essentials

You're reading from   SQL Server 2014 Development Essentials Design, implement, and deliver a successful database solution with Microsoft SQL Server 2014.

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781782172550
Length 214 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Basit A. Masood-Al-Farooq Basit A. Masood-Al-Farooq
Author Profile Icon Basit A. Masood-Al-Farooq
Basit A. Masood-Al-Farooq
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Microsoft SQL Server Database Design Principles FREE CHAPTER 2. Understanding DDL and DCL Statements in SQL Server 3. Data Retrieval Using Transact-SQL Statements 4. Data Modification with SQL Server Transact-SQL Statements 5. Understanding Advanced Database Programming Objects and Error Handling 6. Performance Basics Index

Query optimization statistics


Query optimization statistics are only a form of dynamic metadata that contains statistical information about the distribution of values in one or more columns of a table or indexed view. Statistics describe index key values, are maintained for index columns, and are used by SQL Server when deciding on the most appropriate indexes to use when running queries. Statistics help estimate the cardinality, or number of rows, in the query result, and this usually helps the query optimizer make better decisions. For example, if there are only a dozen rows in a table, then there is no reason to go to the index to search. This is because it is always better to do a full table scan to find the required result set. However, if that same table grows to one million rows, then you're probably better off using the index.

The SQL Server query optimizer uses statistics to create query plans, which improves the query performance. For most queries, the query optimizer generates...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime