The Importance of Database Indexes

The Importance of Database Indexes

The Importance of Database Indexes

This article discusses the importance of database indexes, how indexing in a database boosts performance, and it is from my eBook:

The Importance of Database Indexes -  How indexing in a database boosts performance - Article on SQLNetHub

Tuning SQL Server (Second Edition)

Table of Contents | Sample ChapterLearn More | Buy

 

What is a Database Index?

Imagine that you have a large book and you are looking for a specific piece of information. If the book has 500 pages and has no index, you will have to go through page by page until to find the information you are looking for. The worst-case scenario would be to check all 500 pages. That would be a full “scan” of the book. However, if the book has an index, you will just go through the index list and find the page that contains the information you are looking for.

The same thing happens with databases. In the database world, seeking specific information in a frequently-used large table without using an index, could end-up scanning the entire table thus taking a considerable amount of time. However, when having an index, eventually the data retrieval time would be much faster as the operation will not have to search every row in the database table every time the database table is accessed.

 

The Importance of Indexing in a Database

Even though indexes are key data structures in databases, they bring the cost of additional writes and the use of more storage space to maintain the extra copy of data. In addition, they need to be frequently maintained in order to be as performant as possible. Nevertheless, the performance gain when using indexes is significant thus making the overheads of maintaining them negligible.

In order to have a healthy set of indexes you need to run frequent maintenance operations. Such operations include index fragmentation checks, reorganization and rebuild actions.

Learn more about SQL Server Performance Tuning!

What are your views on the subject? Have something to share? Feel free to leave your comment!

Check all our other related SQL Server Performance articles.

Check out our latest software releases!

Subscribe to our newsletterand stay up to date!

Check out Artemakis’s eBooks!

 

Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

Loading...

Reference: SQLNetHub (https://www.sqlnethub.com)

© SQLNetHub

 

The Importance of Database Indexes Click to Tweet
Artemakis Artemiou
Artemakis Artemiou is a Senior SQL Server and Software Architect, Author, and a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Artemakis's official website can be found at aartemiou.com.