Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

.Dd December 19, 2018
.Dt SQLITE3_STMT_SCANSTATUS 3
.Os
.Sh NAME
.Nm sqlite3_stmt_scanstatus
.Nd Prepared Statement Scan Status
.Sh SYNOPSIS
.Ft int 
.Fo sqlite3_stmt_scanstatus
.Fa "sqlite3_stmt *pStmt"
.Fa "int idx"
.Fa "int iScanStatusOp"
.Fa "void *pOut                "
.Fc
.Sh DESCRIPTION
This interface returns information about the predicted and measured
performance for pStmt.
Advanced applications can use this interface to compare the predicted
and the measured performance and issue warnings and/or rerun ANALYZE
if discrepancies are found.
.Pp
Since this interface is expected to be rarely used, it is only available
if SQLite is compiled using the SQLITE_ENABLE_STMT_SCANSTATUS
compile-time option.
.Pp
The "iScanStatusOp" parameter determines which status information to
return.
The "iScanStatusOp" must be one of the scanstatus options
or the behavior of this interface is undefined.
The requested measurement is written into a variable pointed to by
the "pOut" parameter.
Parameter "idx" identifies the specific loop to retrieve statistics
for.
Loops are numbered starting from zero.
If idx is out of range - less than zero or greater than or equal to
the total number of loops used to implement the statement - a non-zero
value is returned and the variable that pOut points to is unchanged.
.Pp
Statistics might not be available for all loops in all statements.
In cases where there exist loops with no available statistics, this
function behaves as if the loop did not exist - it returns non-zero
and leave the variable that pOut points to unchanged.
.Pp
.Sh SEE ALSO
.Xr SQLITE_SCANSTAT_NLOOP 3 ,
.Xr sqlite3_stmt_scanstatus_reset 3