1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Store values loaded from the stat1 table as logarithmic values in memory.

FossilOrigin-Name: 1bd74c49ddab6f53bb6eaa57907eff44c2580dd6
This commit is contained in:
dan
2014-04-25 15:01:01 +00:00
parent aa9933c115
commit cfc9df76e1
8 changed files with 72 additions and 51 deletions

View File

@@ -1471,7 +1471,7 @@ struct Table {
#ifndef SQLITE_OMIT_CHECK
ExprList *pCheck; /* All CHECK constraints */
#endif
tRowcnt nRowEst; /* Estimated rows in table - from sqlite_stat1 table */
LogEst nRowLogEst; /* Estimated rows in table - from sqlite_stat1 table */
int tnum; /* Root BTree node for this table (see note above) */
i16 iPKey; /* If not negative, use aCol[iPKey] as the primary key */
i16 nCol; /* Number of columns in this table */
@@ -1680,7 +1680,10 @@ struct UnpackedRecord {
struct Index {
char *zName; /* Name of this index */
i16 *aiColumn; /* Which columns are used by this index. 1st is 0 */
#if 0
tRowcnt *aiRowEst; /* From ANALYZE: Est. rows selected by each column */
#endif
LogEst *aiRowLogEst; /* From ANALYZE: Est. rows selected by each column */
Table *pTable; /* The SQL table being indexed */
char *zColAff; /* String defining the affinity of each column */
Index *pNext; /* The next index associated with the same table */