Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server on Linux

You're reading from  SQL Server on Linux

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781788291804
Pages 222 pages
Edition 1st Edition
Languages
Toc

Table of Contents (19) Chapters close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Linux Distributions 2. Installation and Configuration 3. SQL Server Basics 4. Database in the Sandbox 5. Sample Databases 6. A Crash Course in Querying 7. Backup and Recovery Operations 8. User Management 9. Implementing Data Protection 10. Indexing 11. In-Memory OLTP 12. Beyond SQL Server

Clustered index


A clustered index sorts and stores the data rows of the table in an order based on the clustered index key. The clustered index is implemented as a B-tree where every page in a tree is called an index node. Because a clustered index determines the order in which table rows are actually stored, each table can have only one clustered index, and the table's rows cannot be stored in more than one order.

Because you can have only one clustered index per table, you must ensure that you use it to achieve the maximum benefits. Before you create a clustered index, you need to understand how your data will be accessed.

Clustered indexes are most effective when used to support queries that do the following:

  • Return a range of values by using operators such as BETWEEN, >, >=, <, and <=
  • Return data sorted using the ORDER BY or GROUP BY clause
  • Return data combined by using JOIN clauses; typically these are foreign key columns
  • Return large result sets

Note

When you define a PRIMARY KEY...

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 €14.99/month. Cancel anytime