1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Add SQLITE_STMTSTATUS_FILTER_HIT and _MISS for tracking the effectiveness

of Bloom filters.

FossilOrigin-Name: 24ba535d200fc8a99dd8e66c6d100b5f6ae442098bafb152008429398eefe3e7
This commit is contained in:
drh
2021-12-06 21:45:31 +00:00
parent 50fb7e09b4
commit 23d41e63f2
6 changed files with 29 additions and 11 deletions

View File

@@ -8239,8 +8239,10 @@ case OP_Filter: { /* jump */
h %= pIn1->n;
if( (pIn1->z[h/8] & (1<<(h&7)))==0 ){
VdbeBranchTaken(1, 2);
p->aCounter[SQLITE_STMTSTATUS_FILTER_HIT]++;
goto jump_to_p2;
}else{
p->aCounter[SQLITE_STMTSTATUS_FILTER_MISS]++;
VdbeBranchTaken(0, 2);
}
break;