Populate or refresh planner statistics.

Section: Planner tools

Analyze statistics

sql
sql
ANALYZE;
Explanation

Statistics can improve plan selection in nontrivial schemas.

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
Use the .expert shell helper
Ask the SQLite shell for index advice.
OpenIn sheetbashsame 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