Index (Database Index) is a data structure used in databases to improve the speed of data retrieval operations. It acts like a lookup system that allows the database to find records quickly without scanning the entire table.
In database management, indexes are created on specific columns to optimize search queries, filtering, and sorting. While indexes improve read performance, they can slightly slow down write operations because the index must also be updated.
For example:
- A database uses an index on the “email” column to quickly find a user account.
- An e-commerce system uses indexes to speed up product searches by name or category.
- A banking system retrieves customer records faster using indexed account numbers.
- A large dataset query runs faster when indexed fields are used in filters.
Common technologies and concepts related to database indexing include:
- SQL Databases (MySQL, PostgreSQL)
- NoSQL Indexing (MongoDB indexes)
- Primary Key Index
- Secondary Index
- Query Optimization
- B-Tree Index
- Hash Index
- Database Performance Tuning
- Search Optimization