🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Databases Intermediate

What is Database Index Types?

Different index structures (B-tree, Hash, GIN, GiST, BRIN) optimized for various query patterns and data types.

Database index types serve different purposes: B-tree indexes handle equality and range queries efficiently and are the default in most databases. Hash indexes are optimized for equality comparisons only. GIN (Generalized Inverted Index) indexes excel at full-text search and JSONB queries in PostgreSQL. GiST (Generalized Search Tree) indexes support geometric data and range types. BRIN (Block Range Index) indexes are compact indexes ideal for naturally ordered data like timestamps. Choosing the right index type can improve query performance by orders of magnitude.

Related Terms

Prepared Statement
A pre-compiled SQL template that uses parameters instead of literal values, preventing SQL injection and improving performance.
Replication
The process of copying and maintaining database data across multiple servers for redundancy, failover, and read scaling.
Transaction
A sequence of database operations that are treated as a single unit — either all succeed or all are rolled back.
Elastic Search
A distributed search and analytics engine built on Apache Lucene, optimized for full-text search and log analysis.
View
A virtual table defined by a SQL query that provides a simplified or restricted view of data from one or more tables.
Stored Procedure
A precompiled collection of SQL statements stored in the database that can be executed as a single unit.
View All Databases Terms →