---
title: "Discussion on \"How Indexes work in databases\" | Hashnode"
description: "Discussion on \"How Indexes work in databases\". Most developers know that adding an index makes queries faster. But why? What actually happens inside the database? Why are B+ Trees used? And why do people say both indexes and tables are stored as B+ Trees? Let's build the intuition from first principles."
url: "https://hashnode.com/posts/how-indexes-work-in-databases/6a4a3ca6bce44c99538e724f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Indexes work in databases](https://p99-isnt-a-metric.hashnode.dev/how-indexes-work-in-databases?utm_source=hashnode&utm_medium=feed)

Most developers know that adding an index makes queries faster. But why? What actually happens inside the database? Why are B+ Trees used? And why do people say both indexes and tables are stored as B+ Trees? Let's build the intuition from first principles.

Jul 5 · 19 min read · p99-isnt-a-metric.hashnode.dev  
Read the article

## Written by

[Naveen](https://hashnode.com/@nash596)

@nash596

  
[View profile](https://hashnode.com/@nash596)

HELPING DEVELOPER

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
