On Thu, Aug 29, 2013 at 11:47 AM, Marc L. Allen <mlal...@outsitenetworks.com > wrote:
> Silly question.. I looked at the fix. Why ignore indexes with greater > than 4 fields? Isn't that a bit risky? Wouldn't it be better to ignore > the fields after the 4th one for planning? > The whereShortCut() routine is merely an optimization. It provides a quick plan for the common case of a single-table query using an equality constraint on a PRIMARY KEY or UNIQUE index. Anything that falls through whereShortCut() goes into the regular query planner and will get analyzed thoroughly there. You could omit the whereShortCut() routine entirely and SQLite would still give the correct answer. The only downside is that sqlite3_prepare_v2() would run slightly slower in the common case. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users