The explain command example gives low level details of the SQLite virtual machine which probably isn't intelligible to many people.
More useful is the explain query plan version which shows which indices and what kind of processing is taking place for a given query. This is useful to identify missing indexes and avoid full table scans.
explain query plan
select
species,
avg(body_mass_g)
from penguins
group by species;
Output:
QUERY PLAN
|--SCAN penguins
`--USE TEMP B-TREE FOR GROUP BY
The
explain
command example gives low level details of the SQLite virtual machine which probably isn't intelligible to many people.More useful is the
explain query plan
version which shows which indices and what kind of processing is taking place for a given query. This is useful to identify missing indexes and avoid full table scans.Output: