๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Databases Intermediate

What is Index?

A data structure that improves the speed of data retrieval operations on database tables at the cost of additional storage.

Indexes work like a book index - they allow the database to find rows without scanning the entire table. Without an index, a query on a million-row table checks every row. With an index, it jumps directly to matching rows.

Types include B-tree (default, good for ranges), hash (exact matches), GIN (full-text search), and GiST (geometric data). Over-indexing slows down writes since indexes must be updated on every INSERT/UPDATE.

Related Terms

Materialized View
A database object that stores the precomputed result of a query, offering faster reads at the cost of periodic refresh.
Foreign Key
A column that creates a link between two tables by referencing the primary key of another table.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
ETL (Extract, Transform, Load)
A data pipeline process that extracts data from sources, transforms it into a suitable format, and loads it into a destination system.
Upsert
A database operation that inserts a new row if it does not exist, or updates the existing row if it does.
ORM (Object-Relational Mapping)
A technique that lets you interact with a database using object-oriented code instead of writing raw SQL queries.
View All Databases Terms โ†’