1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-03 08:01:19 +03:00

Rework this changes so that instead of setting the WhereTerm.truthProb when

a term is seen to be of low selectivity, it merely sets a new flag
(the TERM_HIGHTRUTH flag) which causes whereLoopOutputAdjust() to ignore
that term.

FossilOrigin-Name: 4558163b6a525990f0f1b6629dbb76daf49bcaf1ddbaf0c50fe05ce9ee480ff8
This commit is contained in:
drh
2020-02-24 16:46:08 +00:00
parent 35d3cb80c4
commit f06cdde2cf
4 changed files with 29 additions and 21 deletions

View File

@@ -292,6 +292,11 @@ struct WhereTerm {
#define TERM_IS 0x0800 /* Term.pExpr is an IS operator */
#define TERM_VARSELECT 0x1000 /* Term.pExpr contains a correlated sub-query */
#define TERM_HEURTRUTH 0x2000 /* Heuristic truthProb used */
#ifdef SQLITE_ENABLE_STAT4
# define TERM_HIGHTRUTH 0x4000 /* Term excludes few rows */
#else
# define TERM_HIGHTRUTH 0 /* Only used with STAT4 */
#endif
/*
** An instance of the WhereScan object is used as an iterator for locating