EXPLAIN / EXPLAIN QUERY PLAN
avancé
Syntaxe
EXPLAIN requete;
EXPLAIN QUERY PLAN requete;
Exemples
EXPLAIN QUERY PLAN
SELECT * FROM etudiants WHERE nom = 'Alice';
QUERY PLAN
`--SCAN etudiants
EXPLAIN QUERY PLAN
SELECT * FROM etudiants WHERE id = 1;
QUERY PLAN
`--SEARCH etudiants USING INTEGER PRIMARY KEY (rowid=?)
SQLite
EXPLAIN seul affiche le bytecode de la machine virtuelle SQLite (bas niveau, rarement utile en pratique). EXPLAIN QUERY PLAN est la version lisible pour analyser l'usage des index.