On 10/1/16, Heather, James (ELS-LON) <james.heat...@elsevier.com> wrote:
>
> This is odd. I had rather assumed it would be possible to speed up the
> searching using those individual indexes... in fact I know it's possible,
> because MySQL performs the same query very much faster when I add the
> individual indexes. How MySQL differs from sqlite in terms of its optimiser,
> I've no idea; but am I right that MySQL stands as an existence proof that
> the individual indexes can be used to solve the problem efficiently?

You might get a satisfactory result using your 6 single-column indexes
if you just run ANALYZE after creating the indexes.  Probably this is
what MySQL is doing (except that it runs the ANALYZE automatically as
it creates the index so that you don't have to).  Please try running
ANALYZE and let us know what happens.

A single three-column index will still be a better solution, though.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to