On Fri, Nov 15, 2013 at 1:55 PM, L. Wood <lwoo...@live.com> wrote: > Suppose I have a table Foo with two columns: state, company_stock_symbol. > (There are other columns but let's ignore them.) > > The states are relatively few (50). There are tens of thousands of > companies. >
I was just reading http://www.sqlite.org/draft/releaselog/3_8_2.html after the WITHOUT ROWID post, and this sounds like the next optimization to be introduced http://www.sqlite.org/draft/optoverview.html#skipscan might has some influence on your index choices in the future. What I wonder though is how many is "too many distinct values in the left-most columns", i.e. is 50 too many or not. Will there be a pragma for the cut-off number, or there's not really a cut-off number but instead the true cardinality of the left-most columns is evaluated and has bearings on the plan cost and it "wins" only if no other plans are cheaper. Richard? TIA, --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users