xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_status.3 (revision a24efa7dea9f1f56c3bdb15a927d3516792ace1c)
1.Dd $Mdocdate$
2.Dt SQLITE3_STATUS 3
3.Os
4.Sh NAME
5.Nm sqlite3_status
6.Nd SQLite Runtime Status
7.Sh SYNOPSIS
8.Ft int
9.Fo sqlite3_status
10.Fa "int op"
11.Fa "int *pCurrent"
12.Fa "int *pHighwater"
13.Fa "int resetFlag"
14.Fc
15.Sh DESCRIPTION
16This interface is used to retrieve runtime status information about
17the performance of SQLite, and optionally to reset various highwater
18marks.
19The first argument is an integer code for the specific parameter to
20measure.
21Recognized integer codes are of the form  SQLITE_STATUS_....
22The current value of the parameter is returned into *pCurrent.
23The highest recorded value is returned in *pHighwater.
24If the resetFlag is true, then the highest record value is reset after
25*pHighwater is written.
26Some parameters do not record the highest value.
27For those parameters nothing is written into *pHighwater and the resetFlag
28is ignored.
29Other parameters record only the highwater mark and not the current
30value.
31For these latter parameters nothing is written into *pCurrent.
32.Pp
33The sqlite3_status() routine returns SQLITE_OK on success and a non-zero
34error code on failure.
35.Pp
36This routine is threadsafe but is not atomic.
37This routine can be called while other threads are running the same
38or different SQLite interfaces.
39However the values returned in *pCurrent and *pHighwater reflect the
40status of SQLite at different points in time and it is possible that
41another thread might change the parameter in between the times when
42*pCurrent and *pHighwater are written.
43.Pp
44.Sh SEE ALSO
45.Xr SQLITE_OK 3 ,
46.Xr sqlite3_db_status 3 ,
47.Xr SQLITE_STATUS_MEMORY_USED 3
48