1.Dd December 19, 2018 2.Dt SQLITE_SCANSTAT_NLOOP 3 3.Os 4.Sh NAME 5.Nm SQLITE_SCANSTAT_NLOOP , 6.Nm SQLITE_SCANSTAT_NVISIT , 7.Nm SQLITE_SCANSTAT_EST , 8.Nm SQLITE_SCANSTAT_NAME , 9.Nm SQLITE_SCANSTAT_EXPLAIN , 10.Nm SQLITE_SCANSTAT_SELECTID 11.Nd Prepared Statement Scan Status Opcodes 12.Sh SYNOPSIS 13.Fd #define SQLITE_SCANSTAT_NLOOP 14.Fd #define SQLITE_SCANSTAT_NVISIT 15.Fd #define SQLITE_SCANSTAT_EST 16.Fd #define SQLITE_SCANSTAT_NAME 17.Fd #define SQLITE_SCANSTAT_EXPLAIN 18.Fd #define SQLITE_SCANSTAT_SELECTID 19.Sh DESCRIPTION 20The following constants can be used for the T parameter to the sqlite3_stmt_scanstatus(S,X,T,V) 21interface. 22Each constant designates a different metric for sqlite3_stmt_scanstatus() 23to return. 24.Pp 25When the value returned to V is a string, space to hold that string 26is managed by the prepared statement S and will be automatically freed 27when S is finalized. 28.Bl -tag -width Ds 29.It SQLITE_SCANSTAT_NLOOP 30The sqlite3_int64 variable pointed to by the T parameter 31will be set to the total number of times that the X-th loop has run. 32.It SQLITE_SCANSTAT_NVISIT 33The sqlite3_int64 variable pointed to by the T parameter 34will be set to the total number of rows examined by all iterations 35of the X-th loop. 36.It SQLITE_SCANSTAT_EST 37The "double" variable pointed to by the T parameter will be set to 38the query planner's estimate for the average number of rows output 39from each iteration of the X-th loop. 40If the query planner's estimates was accurate, then this value will 41approximate the quotient NVISIT/NLOOP and the product of this value 42for all prior loops with the same SELECTID will be the NLOOP value 43for the current loop. 44.It SQLITE_SCANSTAT_NAME 45The "const char *" variable pointed to by the T parameter will be set 46to a zero-terminated UTF-8 string containing the name of the index 47or table used for the X-th loop. 48.It SQLITE_SCANSTAT_EXPLAIN 49The "const char *" variable pointed to by the T parameter will be set 50to a zero-terminated UTF-8 string containing the EXPLAIN QUERY PLAN 51description for the X-th loop. 52.It SQLITE_SCANSTAT_SELECT 53The "int" variable pointed to by the T parameter will be set to the 54"select-id" for the X-th loop. 55The select-id identifies which query or subquery the loop is part of. 56The main query has a select-id of zero. 57The select-id is the same value as is output in the first column of 58an EXPLAIN QUERY PLAN query. 59.El 60.Pp 61.Sh SEE ALSO 62.Xr sqlite_int64 3 63