1.Dd January 24, 2024 2.Dt SQLITE_STMTSTATUS_FULLSCAN_STEP 3 3.Os 4.Sh NAME 5.Nm SQLITE_STMTSTATUS_FULLSCAN_STEP , 6.Nm SQLITE_STMTSTATUS_SORT , 7.Nm SQLITE_STMTSTATUS_AUTOINDEX , 8.Nm SQLITE_STMTSTATUS_VM_STEP , 9.Nm SQLITE_STMTSTATUS_REPREPARE , 10.Nm SQLITE_STMTSTATUS_RUN , 11.Nm SQLITE_STMTSTATUS_FILTER_MISS , 12.Nm SQLITE_STMTSTATUS_FILTER_HIT , 13.Nm SQLITE_STMTSTATUS_MEMUSED 14.Nd status parameters for prepared statements 15.Sh SYNOPSIS 16.In sqlite3.h 17.Fd #define SQLITE_STMTSTATUS_FULLSCAN_STEP 18.Fd #define SQLITE_STMTSTATUS_SORT 19.Fd #define SQLITE_STMTSTATUS_AUTOINDEX 20.Fd #define SQLITE_STMTSTATUS_VM_STEP 21.Fd #define SQLITE_STMTSTATUS_REPREPARE 22.Fd #define SQLITE_STMTSTATUS_RUN 23.Fd #define SQLITE_STMTSTATUS_FILTER_MISS 24.Fd #define SQLITE_STMTSTATUS_FILTER_HIT 25.Fd #define SQLITE_STMTSTATUS_MEMUSED 26.Sh DESCRIPTION 27These preprocessor macros define integer codes that name counter values 28associated with the 29.Fn sqlite3_stmt_status 30interface. 31The meanings of the various counters are as follows: 32.Bl -tag -width Ds 33.It SQLITE_STMTSTATUS_FULLSCAN_STEP 34This is the number of times that SQLite has stepped forward in a table 35as part of a full table scan. 36Large numbers for this counter may indicate opportunities for performance 37improvement through careful use of indices. 38.It SQLITE_STMTSTATUS_SORT 39This is the number of sort operations that have occurred. 40A non-zero value in this counter may indicate an opportunity to improvement 41performance through careful use of indices. 42.It SQLITE_STMTSTATUS_AUTOINDEX 43This is the number of rows inserted into transient indices that were 44created automatically in order to help joins run faster. 45A non-zero value in this counter may indicate an opportunity to improvement 46performance by adding permanent indices that do not need to be reinitialized 47each time the statement is run. 48.It SQLITE_STMTSTATUS_VM_STEP 49This is the number of virtual machine operations executed by the prepared 50statement if that number is less than or equal to 2147483647. 51The number of virtual machine operations can be used as a proxy for 52the total work done by the prepared statement. 53If the number of virtual machine operations exceeds 2147483647 then 54the value returned by this statement status code is undefined. 55.It SQLITE_STMTSTATUS_REPREPARE 56This is the number of times that the prepare statement has been automatically 57regenerated due to schema changes or changes to bound parameters 58that might affect the query plan. 59.It SQLITE_STMTSTATUS_RUN 60This is the number of times that the prepared statement has been run. 61A single "run" for the purposes of this counter is one or more calls 62to 63.Fn sqlite3_step 64followed by a call to 65.Fn sqlite3_reset . 66The counter is incremented on the first 67.Fn sqlite3_step 68call of each cycle. 69.It SQLITE_STMTSTATUS_FILTER_HIT SQLITE_STMTSTATUS_FILTER_MISS 70SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join step 71was bypassed because a Bloom filter returned not-found. 72The corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number 73of times that the Bloom filter returned a find, and thus the join step 74had to be processed as normal. 75.It SQLITE_STMTSTATUS_MEMUSED 76This is the approximate number of bytes of heap memory used to store 77the prepared statement. 78This value is not actually a counter, and so the resetFlg parameter 79to sqlite3_stmt_status() is ignored when the opcode is SQLITE_STMTSTATUS_MEMUSED. 80.El 81.Pp 82.Sh IMPLEMENTATION NOTES 83These declarations were extracted from the 84interface documentation at line 8805. 85.Bd -literal 86#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 87#define SQLITE_STMTSTATUS_SORT 2 88#define SQLITE_STMTSTATUS_AUTOINDEX 3 89#define SQLITE_STMTSTATUS_VM_STEP 4 90#define SQLITE_STMTSTATUS_REPREPARE 5 91#define SQLITE_STMTSTATUS_RUN 6 92#define SQLITE_STMTSTATUS_FILTER_MISS 7 93#define SQLITE_STMTSTATUS_FILTER_HIT 8 94#define SQLITE_STMTSTATUS_MEMUSED 99 95.Ed 96.Sh SEE ALSO 97.Xr sqlite3_reset 3 , 98.Xr sqlite3_step 3 , 99.Xr sqlite3_stmt_status 3 100