xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_stmt_status.3 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.Dd March 11, 2017
2.Dt SQLITE3_STMT_STATUS 3
3.Os
4.Sh NAME
5.Nm sqlite3_stmt_status
6.Nd Prepared Statement Status
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_stmt_status
10.Fa "sqlite3_stmt*"
11.Fa "int op"
12.Fa "int resetFlg"
13.Fc
14.Sh DESCRIPTION
15Each prepared statement maintains various SQLITE_STMTSTATUS counters
16that measure the number of times it has performed specific operations.
17These counters can be used to monitor the performance characteristics
18of the prepared statements.
19For example, if the number of table steps greatly exceeds the number
20of table searches or result rows, that would tend to indicate that
21the prepared statement is using a full table scan rather than an index.
22.Pp
23This interface is used to retrieve and reset counter values from a
24prepared statement.
25The first argument is the prepared statement object to be interrogated.
26The second argument is an integer code for a specific SQLITE_STMTSTATUS counter
27to be interrogated.
28The current value of the requested counter is returned.
29If the resetFlg is true, then the counter is reset to zero after this
30interface call returns.
31.Pp
32.Sh SEE ALSO
33.Xr sqlite3_stmt 3 ,
34.Xr sqlite3_db_status 3 ,
35.Xr sqlite3_status 3 ,
36.Xr SQLITE_STMTSTATUS_FULLSCAN_STEP 3
37