Nathaniel Smith wrote:
> A plausible heuristic would be to use the index
> that lets you satisfy more parts of the constraint, but that heuristic
> would be wrong in this case, since in fact there are many certs with
> NAME=branch, VALUE=net.venge.monotone, but few certs with ID=da39...

That should not happen, because:
http://www.sqlite.org/optoverview.html
6.0 Choosing between multiple indices
[..] The ANALYZE command scans all indices of database where there might
be a choice between two or more indices and gathers statistics on the
selectiveness of those indices. The results of this scan are stored in
the sqlite_stat1 table. [...]

BTW the columns can also be manually disallowed index-use: "[...] Terms
of the WHERE clause can be manually disqualified for use with indices by
prepending a unary + operator to the column name. [...]"
(though it seems to give longer opcodes no matter which one of the three
columns IO tried to exclude)



_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to