---
title: "Discussion on \"Database Indexing, What, When and How\" | Hashnode"
description: "Discussion on \"Database Indexing, What, When and How\". A query is slow:\nSELECT * FROM orders WHERE customer_id = 123;\n\nThe usual fix is to add an index on customer_id, and it works. But the moment your query grows a second condition -\nSELECT * FROM orders"
url: "https://hashnode.com/posts/database-indexing-what-when-and-how/6a5c8f9771537ba5aacdfbc0"
---

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

Discussion

# [Database Indexing, What, When and How](https://tech.latencot.com/database-indexing-what-when-and-how?utm_source=hashnode&utm_medium=feed)

A query is slow: SELECT \* FROM orders WHERE customer\_id = 123; The usual fix is to add an index on customer\_id, and it works. But the moment your query grows a second condition - SELECT \* FROM orders

Jul 19 · 11 min read · tech.latencot.com  
Read the article

## Written by

[Sankalp pol](https://hashnode.com/@latencot)

@latencot

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
