Here is another popular lab from Hands-On-Lab library: Improving SQL Server Query Performance with Indexes – Part 1.
Effective indexes are one of the best ways to improve performance in a database application. Without an index, the SQL Server engine is like a reader trying to find a word in a book by examining each page. By using the index in the back of a book, a reader can complete the task in a much shorter time, same way SQL Server uses the index to find data in a table. There is no. of aspects we need to look at before creating an index. Too many index or index in the wrong column also degrade the performance, thus we need to build the proper index to get the maximum performance with minimum resources and time. In this lab, we will look at different aspects that we need to look, before building an index. In the first exercise of this lab, we will look at how index are used in case of joins. In the second exercise, we will look at how index are used in case of aggregates. In the third exercise, we will look at SARGable and index.
Exercise 1: Indexing for Joins
Exercise 2: Indexing for Aggregates
Exercise 3: Index and SARGable
SQLMaestros Hands-On-Labs enables the practical way of learning. Each lab document consists of multiple exercises and each exercise consists of multiple tasks. Apart from step-by-step instructions, the HOL document contains images, explanations, observations, notes, tips & tricks to ensure a great learning experience. With each lab, you can practice a specific concept step-by-step. With our HOL documents, you will get hands-on with hundreds of topics in SQL Server & Microsoft Data Platform. Learn More.