Re: [sqlite] Optimizing searches across several indexes

2017-08-09 Thread Wout Mertens
This mailing list is so amazing :) Thank you both, everything is clear now! On Wed, Aug 9, 2017 at 9:08 AM Hick Gunter wrote: > An index is only usable for that subset of a queries' equality constraints > that forms a leading subset of the fields handled by the index. > >

Re: [sqlite] Optimizing searches across several indexes

2017-08-09 Thread Hick Gunter
An index is only usable for that subset of a queries' equality constraints that forms a leading subset of the fields handled by the index. E.g.if you are looking at equality constraints for fields a, b and c in one query, then you need an index whose first three fields are a, b and c (in any

Re: [sqlite] Optimizing searches across several indexes

2017-08-09 Thread Clemens Ladisch
Wout Mertens wrote: > I have a table with a bunch of data (in json). I want to search on several > values, each one is indexed. However, if I search for COND1 AND COND2, the > query plan is simply > > SEARCH TABLE data USING INDEX cond1Index (cond1=?) > > Is this normal? Yes. A query can use