SQLite Indexes and Query Planner/Use the .expert shell helper

Ask the SQLite shell for index advice.

Section: Planner tools

Use the .expert shell helper

bash
bash
sqlite3 app.db ".expert"
Explanation

The SQLite CLI includes tools that can help surface candidate indexes for sample queries.

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 Planner tools
Explain query plan
Inspect scans, searches, and covering-index use.
OpenIn sheetsqlsame section
Analyze statistics
Populate or refresh planner statistics.
OpenIn sheetsqlsame section
Create an index
Add a basic lookup index.
OpenIn sheetsql1 tag match
Expression index
Index a computed expression used in the query.
OpenIn sheetsql1 tag match
Partial index
Index only matching rows.
OpenIn sheetsql1 tag match