1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Change the "PRAGMA stats" command to report size values in LogEst units.

The eliminates the need for sqlite3LogEstToInt() unless non-standard
compile-time options are used, so leave it out except in those cases.

FossilOrigin-Name: 832c237fcbe83dd4f5a18a06acb0aeb7e2b9e712
This commit is contained in:
drh
2016-02-25 21:19:03 +00:00
parent aa9ffaba4a
commit d566c95179
5 changed files with 25 additions and 15 deletions

View File

@@ -1400,8 +1400,14 @@ LogEst sqlite3LogEstFromDouble(double x){
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
#if defined(SQLITE_ENABLE_STMT_SCANSTAT) || \
defined(SQLITE_ENABLE_STAT3_OR_STAT4) || \
defined(SQLITE_EXPLAIN_ESTIMATED_ROWS)
/*
** Convert a LogEst into an integer.
**
** Note that this routine is only used when one or more of various
** non-standard compile-time options is enabled.
*/
u64 sqlite3LogEstToInt(LogEst x){
u64 n;
@@ -1415,3 +1421,4 @@ u64 sqlite3LogEstToInt(LogEst x){
}
return (n+8)>>(3-x);
}
#endif /* defined SCANSTAT or STAT4 or ESTIMATED_ROWS */