PostgreSQL 18 · Performance and maintenance
Create an index
Add an index to speed up lookups on a column.
CREATE INDEX idx_users_email ON users (email);
Official PostgreSQL 18 documentation
More performance and maintenance commands
- See how a query runs
- Create an index without blocking writes
- Vacuum and update statistics
- See running queries
- Cancel a running query
All performance and maintenance commands · PostgreSQL 18 cheatsheet