Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects simply to a non-technical, business audience. Over…
In database systems, an index (IDX) is a data structure defined on columns in a database table to significantly speed up data retrieval operations. An index is a small copy of a database table sorted by key values. Without an index, query languages like SQL may have to scan the entire table from top to bottom to choose relevant rows.
An index on a database table must be created with care, as indexes consume space and are stored in the database. An index can also cause write operations to take more time, as the index must be updated when the underlying table is updated.
The different data structures used to create indexes are B+ trees, balanced trees and hashes. Using these data structures, a scan on the entire database table is relatively easy.
Indexes can also be created on functions or expressions. A unique index prevents duplicate entries in the index and the related table, thus acting as a constraint. Column order is also an important aspect of indexing. The first indexed column always has a priority; row identifiers are retrieved based on the first indexed columns. In a normal scenario, indexes do not return a value but only locate records.
There are generally two types of index architecture:
Techopedia’s editorial policy is centered on delivering thoroughly researched, accurate, and unbiased content. We uphold strict sourcing standards, and each page undergoes diligent review by our team of top technology experts and seasoned editors. This process ensures the integrity, relevance, and value of our content for our readers.
Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.
What is Differential Privacy? Differential privacy is a mathematical framework for determining a quantifiable and adjustable level of privacy protection....
Margaret RouseTechnology Expert
What is cPanel Used For? cPanel is a crucial tool to help you access hosting features via a simple, non-technical...
Ilijia MiljkovacTechnology Writer
What is Operational Technology? Operational Technology, or OT, refers to the hardware and software systems that are used to control...
Marshall GunnellIT & Cybersecurity Expert
Trending NewsLatest GuidesReviewsTerm of the Day