🎁 New User? Get 20% off your first purchase with code NEWUSER20 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

Connection String
A formatted string containing all parameters needed to establish a connection to a database server.
Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
Migration
A version-controlled change to a database schema that can be applied and reversed systematically.
Database Index Types
Different index structures (B-tree, Hash, GIN, GiST, BRIN) optimized for various query patterns and data types.
Data Warehouse
A centralized repository optimized for analytical queries that integrates data from multiple operational sources.
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 →