1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

On the ".scanstats on" output in the shell, initialize the estimated count for

the first loop of each subquery to the actual loop count.

FossilOrigin-Name: d1c51c8455d5ce972a77720c2d56228646ced27c
This commit is contained in:
drh
2014-11-06 12:17:24 +00:00
parent 42f30bce11
commit 179bac3a14
3 changed files with 11 additions and 8 deletions

View File

@@ -1209,7 +1209,10 @@ static void display_scanstats(
}
sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_SELECTID, (void*)&iSid);
if( iSid!=k ) continue;
if( n==0 && k>0 ) fprintf(pArg->out, "-------- subquery %d --------\n", k);
if( n==0 ){
rEstLoop = (double)nLoop;
if( k>0 ) fprintf(pArg->out, "-------- subquery %d --------\n", k);
}
n++;
sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_NVISIT, (void*)&nVisit);
sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_EST, (void*)&rEst);