๐ŸŽ 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

JSONB
PostgreSQL's binary JSON data type that stores JSON documents with indexing, querying, and manipulation capabilities.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
Stored Procedure
A precompiled collection of SQL statements stored in the database that can be executed as a single unit.
Window Function
An SQL function that performs calculations across a set of rows related to the current row without collapsing the result set.
ACID
A set of four properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable database transactions.
Redis
An open-source, in-memory data store used as a database, cache, message broker, and queue with sub-millisecond response times.
View All Databases Terms โ†’