/ Check-in [74a5454a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix compilation issue when STAT4 is not enabled.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | stat4-skipscan
Files: files | file ages | folders
SHA1: 74a5454a710e1b7d8575cec2f872e6110aefce17
User & Date: mistachkin 2014-06-26 21:32:09
Context
2014-06-27
20:14
Fix a couple of problems in estimating the number of rows visited by a range query that uses a skip-scan. check-in: 219736f5 user: dan tags: stat4-skipscan
2014-06-26
21:32
Fix compilation issue when STAT4 is not enabled. check-in: 74a5454a user: mistachkin tags: stat4-skipscan
20:21
Attempt to use sqlite_stat4 data to estimate the number of rows visited by a range query that uses a skip-scan. This code is largely untested. check-in: 01dc8102 user: dan tags: stat4-skipscan
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  1995   1995       }else if( (pTerm->wtFlags & TERM_VNULL)==0 ){
  1996   1996         nRet -= 20;        assert( 20==sqlite3LogEst(4) );
  1997   1997       }
  1998   1998     }
  1999   1999     return nRet;
  2000   2000   }
  2001   2001   
         2002  +#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
  2002   2003   /* 
  2003   2004   ** This function is called to estimate the number of rows visited by a
  2004   2005   ** range-scan on a skip-scan index. For example:
  2005   2006   **
  2006   2007   **   CREATE INDEX i1 ON t1(a, b, c);
  2007   2008   **   SELECT * FROM t1 WHERE a=? AND c BETWEEN ? AND ?;
  2008   2009   **
................................................................................
  2087   2088   
  2088   2089     sqlite3ValueFree(p1);
  2089   2090     sqlite3ValueFree(p2);
  2090   2091     sqlite3ValueFree(pVal);
  2091   2092   
  2092   2093     return rc;
  2093   2094   }
         2095  +#endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
  2094   2096   
  2095   2097   /*
  2096   2098   ** This function is used to estimate the number of rows that will be visited
  2097   2099   ** by scanning an index for a range of values. The range may have an upper
  2098   2100   ** bound, a lower bound, or both. The WHERE clause terms that set the upper
  2099   2101   ** and lower bounds are represented by pLower and pUpper respectively. For
  2100   2102   ** example, assuming that index p is on t1(a):