Middle
How does an index speed up query execution in a database?
sobes.tech AI
Answer from AI
An index creates an ordered data structure (e.g., a B-tree) that references rows in a table. When searching for data by a field that has an index, the DBMS can use this index to quickly find the needed rows instead of scanning the entire table. This significantly reduces the execution time of SELECT, UPDATE, and DELETE operations when using a WHERE condition on the indexed field.