Database
Indexing
Added: June 23, 2026
Definition
Indexing is a database technique that creates a special lookup structure (index) on one or more columns to speed up data retrieval (SELECT queries), similar to a book index.
What Problem It Solves
It solves slow searching in large tables by avoiding full table scan and enabling fast data access (efficient search).
What Happens If Not Used
Database performs a full table scan (row-by-row search), which becomes slow and inefficient for large datasets.
Easy Wording
It “helps database find data faster.”
Technical Example
Like using a book index page instead of reading every page to find a topic. CREATE INDEX idx_name ON students(name); Now queries like: SELECT * FROM students WHERE name = 'Ali'; run faster using the index instead of scanning all rows.