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

Further testing and bug fixing for sqlite_stat3. Added the Index.avgEq

field to index statistics.  Fixed several problems in the query planner
associated with stat3.

FossilOrigin-Name: 89b2f70884cad0abdf4c66cb64ecddb2820ded74
This commit is contained in:
drh
2011-08-13 19:35:19 +00:00
parent f404c86ad7
commit 4e50c5ec48
13 changed files with 188 additions and 158 deletions

View File

@@ -1502,6 +1502,7 @@ struct Index {
u8 *aSortOrder; /* Array of size Index.nColumn. True==DESC, False==ASC */
char **azColl; /* Array of collation sequence names for index */
#ifdef SQLITE_ENABLE_STAT3
tRowcnt avgEq; /* Average nEq value for key values not in aSample */
IndexSample *aSample; /* Samples of the left-most key */
#endif
};
@@ -1520,6 +1521,7 @@ struct IndexSample {
u16 nByte; /* Size in byte of text or blob. */
tRowcnt nEq; /* Est. number of rows where the key equals this sample */
tRowcnt nLt; /* Est. number of rows where key is less than this sample */
tRowcnt nDLt; /* Est. number of distinct keys less than this sample */
};
/*