diff options
Diffstat (limited to 'static/netbsd/man3/SQLITE_SCANSTAT_NLOOP.3')
| -rw-r--r-- | static/netbsd/man3/SQLITE_SCANSTAT_NLOOP.3 | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/static/netbsd/man3/SQLITE_SCANSTAT_NLOOP.3 b/static/netbsd/man3/SQLITE_SCANSTAT_NLOOP.3 new file mode 100644 index 00000000..7d1d92a8 --- /dev/null +++ b/static/netbsd/man3/SQLITE_SCANSTAT_NLOOP.3 @@ -0,0 +1,95 @@ +.Dd January 24, 2024 +.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 , +.Nm SQLITE_SCANSTAT_PARENTID , +.Nm SQLITE_SCANSTAT_NCYCLE +.Nd prepared statement scan status opcodes +.Sh SYNOPSIS +.In sqlite3.h +.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 +.Fd #define SQLITE_SCANSTAT_PARENTID +.Fd #define SQLITE_SCANSTAT_NCYCLE +.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. +.Pp +Not all values are available for all query elements. +When a value is not available, the output variable is set to -1 if +the value is numeric, or to NULL if it is a string (SQLITE_SCANSTAT_NAME). +.Bl -tag -width Ds +.It SQLITE_SCANSTAT_NLOOP +The sqlite3_int64 variable pointed to by the V 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 V 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 V 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 V 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 V 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_SELECTID +The "int" variable pointed to by the V parameter will be set to the +id for the X-th query plan element. +The id value is unique within the statement. +The select-id is the same value as is output in the first column of +an EXPLAIN QUERY PLAN query. +.It SQLITE_SCANSTAT_PARENTID +The "int" variable pointed to by the V parameter will be set to the +the id of the parent of the current query element, if applicable, or +to zero if the query element has no parent. +This is the same value as returned in the second column of an EXPLAIN QUERY PLAN +query. +.It SQLITE_SCANSTAT_NCYCLE +The sqlite3_int64 output value is set to the number of cycles, according +to the processor time-stamp counter, that elapsed while the query element +was being processed. +This value is not available for all query elements - if it is unavailable +the output variable is set to -1. +.El +.Pp +.Sh IMPLEMENTATION NOTES +These declarations were extracted from the +interface documentation at line 10143. +.Bd -literal +#define SQLITE_SCANSTAT_NLOOP 0 +#define SQLITE_SCANSTAT_NVISIT 1 +#define SQLITE_SCANSTAT_EST 2 +#define SQLITE_SCANSTAT_NAME 3 +#define SQLITE_SCANSTAT_EXPLAIN 4 +#define SQLITE_SCANSTAT_SELECTID 5 +#define SQLITE_SCANSTAT_PARENTID 6 +#define SQLITE_SCANSTAT_NCYCLE 7 +.Ed +.Sh SEE ALSO +.Xr sqlite_int64 3 |
