DEV Community

Cover image for What is Database Indexing?
Miahlouge
Miahlouge

Posted on • Edited on

What is Database Indexing?

Indexing is a database optimization technique that creates specialized lookup structures (B-Trees).

𝗜𝗻𝗱𝗲𝘅𝗶𝗻𝗴 𝗞𝗲𝘆 𝗕𝗲𝗻𝗲𝗳𝗶𝘁𝘀
→ Fasts data retrieval by reducing search time
→ Enables efficient lookup structures without altering original data
→ Keeps the underlying data intact, ensuring data consistency
→ Optimizes query execution paths for faster access

𝗜𝗻𝗱𝗲𝘅𝗶𝗻𝗴 𝗗𝗶𝘀𝗮𝗱𝘃𝗮𝗻𝘁𝗮𝗴𝗲𝘀
→ Increases storage requirements due to additional data structures
→ Slows down write operations (INSERT, UPDATE, DELETE)
→ Over-indexing can hurt more than help

Top comments (0)