1.Dd March 11, 2017 2.Dt SQLITE3_STMT_SCANSTATUS 3 3.Os 4.Sh NAME 5.Nm sqlite3_stmt_scanstatus 6.Nd Prepared Statement Scan Status 7.Sh SYNOPSIS 8.Ft int 9.Fo sqlite3_stmt_scanstatus 10.Fa "sqlite3_stmt *pStmt" 11.Fa "int idx" 12.Fa "int iScanStatusOp" 13.Fa "void *pOut " 14.Fc 15.Sh DESCRIPTION 16This interface returns information about the predicted and measured 17performance for pStmt. 18Advanced applications can use this interface to compare the predicted 19and the measured performance and issue warnings and/or rerun ANALYZE 20if discrepancies are found. 21.Pp 22Since this interface is expected to be rarely used, it is only available 23if SQLite is compiled using the SQLITE_ENABLE_STMT_SCANSTATUS 24compile-time option. 25.Pp 26The "iScanStatusOp" parameter determines which status information to 27return. 28The "iScanStatusOp" must be one of the scanstatus options 29or the behavior of this interface is undefined. 30The requested measurement is written into a variable pointed to by 31the "pOut" parameter. 32Parameter "idx" identifies the specific loop to retrieve statistics 33for. 34Loops are numbered starting from zero. 35If idx is out of range - less than zero or greater than or equal to 36the total number of loops used to implement the statement - a non-zero 37value is returned and the variable that pOut points to is unchanged. 38.Pp 39Statistics might not be available for all loops in all statements. 40In cases where there exist loops with no available statistics, this 41function behaves as if the loop did not exist - it returns non-zero 42and leave the variable that pOut points to unchanged. 43.Pp 44.Sh SEE ALSO 45.Xr SQLITE_SCANSTAT_NLOOP 3 , 46.Xr sqlite3_stmt_scanstatus_reset 3 47