1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Improved WHERETRACE messages for the estimated output row reductions from

range scans.

FossilOrigin-Name: fdd478bb11eb9e244a7a1fb628ac27c53830fb24
This commit is contained in:
drh
2014-08-28 19:38:22 +00:00
parent defb8223b4
commit ae914d783a
3 changed files with 14 additions and 9 deletions

View File

@@ -2254,7 +2254,7 @@ static int whereRangeScanEst(
if( nNew<nOut ){
nOut = nNew;
}
WHERETRACE(0x10, ("range scan regions: %u..%u est=%d\n",
WHERETRACE(0x10, ("STAT4 range scan: %u..%u est=%d\n",
(u32)iLower, (u32)iUpper, nOut));
}
}else{
@@ -2282,6 +2282,12 @@ static int whereRangeScanEst(
nOut -= (pLower!=0) + (pUpper!=0);
if( nNew<10 ) nNew = 10;
if( nNew<nOut ) nOut = nNew;
#if defined(WHERETRACE_ENABLED)
if( pLoop->nOut>nOut ){
WHERETRACE(0x10,("Range scan lowers nOut from %d to %d\n",
pLoop->nOut, nOut));
}
#endif
pLoop->nOut = (LogEst)nOut;
return rc;
}