scoreof some users, in the index, the scores will be stored sorted, from the smallest to the largest (or vice-versa).
EXPLAIN QUERY PLAN $your_queryreturns a human-readable representation of what the SQL engine is going to do to fetch the data.
footable will help SQLite in searching more efficiently the table.
foo, we have the index we created previously that simplifies the search, in
barwe don't have any indexes, so we are forced to do a full table scan.
barwe are using a
COVERING INDEXinstead of a standard index.
bartable in the result set, but we only compare that one column of
foois equal to one of
foo_athe SQLite engine prefers the one on both
ANDwe have an
OR, in this case, one more search is necessary.
OR, then a full table scan is almost guarantee, unless you don't have a separated index for each column in the table.