.Dd December 19, 2018 .Dt SQLITE_SCANSTAT_NLOOP 3 .Os .Sh NAME .Nm SQLITE_SCANSTAT_NLOOP , .Nm SQLITE_SCANSTAT_NVISIT , .Nm SQLITE_SCANSTAT_EST , .Nm SQLITE_SCANSTAT_NAME , .Nm SQLITE_SCANSTAT_EXPLAIN , .Nm SQLITE_SCANSTAT_SELECTID .Nd Prepared Statement Scan Status Opcodes .Sh SYNOPSIS .Fd #define SQLITE_SCANSTAT_NLOOP .Fd #define SQLITE_SCANSTAT_NVISIT .Fd #define SQLITE_SCANSTAT_EST .Fd #define SQLITE_SCANSTAT_NAME .Fd #define SQLITE_SCANSTAT_EXPLAIN .Fd #define SQLITE_SCANSTAT_SELECTID .Sh DESCRIPTION The following constants can be used for the T parameter to the sqlite3_stmt_scanstatus(S,X,T,V) interface. Each constant designates a different metric for sqlite3_stmt_scanstatus() to return. .Pp When the value returned to V is a string, space to hold that string is managed by the prepared statement S and will be automatically freed when S is finalized. .Bl -tag -width Ds .It SQLITE_SCANSTAT_NLOOP The sqlite3_int64 variable pointed to by the T parameter will be set to the total number of times that the X-th loop has run. .It SQLITE_SCANSTAT_NVISIT The sqlite3_int64 variable pointed to by the T parameter will be set to the total number of rows examined by all iterations of the X-th loop. .It SQLITE_SCANSTAT_EST The "double" variable pointed to by the T parameter will be set to the query planner's estimate for the average number of rows output from each iteration of the X-th loop. If the query planner's estimates was accurate, then this value will approximate the quotient NVISIT/NLOOP and the product of this value for all prior loops with the same SELECTID will be the NLOOP value for the current loop. .It SQLITE_SCANSTAT_NAME The "const char *" variable pointed to by the T parameter will be set to a zero-terminated UTF-8 string containing the name of the index or table used for the X-th loop. .It SQLITE_SCANSTAT_EXPLAIN The "const char *" variable pointed to by the T parameter will be set to a zero-terminated UTF-8 string containing the EXPLAIN QUERY PLAN description for the X-th loop. .It SQLITE_SCANSTAT_SELECT The "int" variable pointed to by the T parameter will be set to the "select-id" for the X-th loop. The select-id identifies which query or subquery the loop is part of. The main query has a select-id of zero. The select-id is the same value as is output in the first column of an EXPLAIN QUERY PLAN query. .El .Pp .Sh SEE ALSO .Xr sqlite_int64 3