monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: Monotone speedup by adding additional database indi


From: Lapo Luchini
Subject: [Monotone-devel] Re: Monotone speedup by adding additional database indices?
Date: Thu, 11 Oct 2007 23:28:09 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.4.0

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]