linkdrift
All you need to know about Indexing

All you need to know about Indexing

Ratish Jain
@ratishtwts·2.4K followers
·5 min read

Imagine you have a database with 1 million employee records. A user sends this query: SELECT * FROM employees WHERE id = 850000; The database needs to find one employee. But there is a problem. We

Imagine you have a database with 1 million employee records. A user sends this query: SELECT * FROM employees WHERE id = 850000; The database needs to find one employee. But there is a problem. We have not created any indexes yet. 1. The problem: Finding one record How does the database find employee 850000? Without an index, the database can scan the table. It starts with the first record. It checks the ID. Then it moves to the next record. It continues until it finds the required employee. Thi

391
0
3
0
Read full article on X