Index a common lookup column.
Section: Create index patterns
Create a single-column index
sql
sql
CREATE INDEX idx_users_email ON users (email);Explanation
A classic lookup index for logins, unique checks, or profile fetches.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Create index patterns
PostgreSQL covering index with INCLUDE
Store extra columns for index-only scans.
Design for equality then range
Put equality columns first in many B-tree cases.