Post by Giuseppe Costanziwhere I can find a good documentation, of keywords in object?
I would want to learn well meaning and use of opcode, p1, p2, pn ,comment
and order,from,detail...
I don't succeed in understanding the output of these two keywordses.
wishes and good year to everybody.
First, although both commands have EXPLAIN in them they do very different things.
EXPLAIN QUERY PLAN is a useful command which tells you how SQLite will do sorting and searching. If your program isn't running quickly enough, sometimes EXPLAIN QUERY PLAN can help. It tells you which indexes will be used, and you can use it to work out whether creating a new index might be useful. The output is nearly English and includes no codes. You can use EXPLAIN QUERY PLAN, then read the output, then do one or more of
* use ANALYZE
* CREATE a new INDEX
* change the format of your SQL statement
then use EXPLAIN QUERY PLAN again and see whether you have improved things.
EXPLAIN tells you about how SQLite works. It's rarely useful for users because there's nothing a user can do about what it shows. It's more useful for the team that writes SQLite itself to see whether SQLite can be improved. To understand the output it helps to learn how SQLite works internally, and this page is a good introduction including a list of the opcodes:
<http://www.sqlite.org/opcode.html>
A normal SQLite user might use EXPLAIN QUERY PLAN sometimes but would probably not use EXPLAIN.
Both commands are considered SQLite internals and the format of the output can change without warning. They're intended for Humans to read. Do not write software which depends on the output of either command.
Simon.