1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

If the user provides likelihood() data for a WHERE clause term used as part of an index key, have the planner use it when calculating the expected number of rows visited by the loop.

FossilOrigin-Name: c51efaa5d29ee0a91b9e6a83a8dd82530670811a
This commit is contained in:
dan
2014-04-25 20:22:45 +00:00
parent cfc9df76e1
commit 8ad1d8ba38
6 changed files with 111 additions and 77 deletions

View File

@@ -458,3 +458,4 @@ struct WhereInfo {
#define WHERE_AUTO_INDEX 0x00004000 /* Uses an ephemeral index */
#define WHERE_SKIPSCAN 0x00008000 /* Uses the skip-scan algorithm */
#define WHERE_UNQ_WANTED 0x00010000 /* WHERE_ONEROW would have been helpful*/
#define WHERE_LIKELIHOOD 0x00020000 /* A likelihood() is affecting nOut */