Skip to content

Indices

Index

  • an index allows you to fetch a row by that attribute in a query in O(1) time

Example

CREATE INDEX student_ID_index on student(ID)

after this

SELECT *
FROM student
WHERE ID = 12345

will run in O(1)