Index a computed expression used in the query.

Section: SQLite index creation

Expression index

sql
sql
CREATE INDEX idx_users_lower_email ON users (lower(email));
Explanation

Helpful when the query uses the same expression in predicates.

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 SQLite index creation
Create an index
Add a basic lookup index.
OpenIn sheetsqlsame section
Partial index
Index only matching rows.
OpenIn sheetsqlsame section
Explain query plan
Inspect scans, searches, and covering-index use.
OpenIn sheetsql1 tag match
Analyze statistics
Populate or refresh planner statistics.
OpenIn sheetsql1 tag match
Use the .expert shell helper
Ask the SQLite shell for index advice.
OpenIn sheetbash1 tag match