xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_DBSTATUS_LOOKASIDE_USED.3 (revision d909946ca08dceb44d7d0f22ec9488679695d976)
1.Dd $Mdocdate$
2.Dt SQLITE_DBSTATUS_LOOKASIDE_USED 3
3.Os
4.Sh NAME
5.Nm SQLITE_DBSTATUS_LOOKASIDE_USED ,
6.Nm SQLITE_DBSTATUS_CACHE_USED ,
7.Nm SQLITE_DBSTATUS_SCHEMA_USED ,
8.Nm SQLITE_DBSTATUS_STMT_USED ,
9.Nm SQLITE_DBSTATUS_LOOKASIDE_HIT ,
10.Nm SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE ,
11.Nm SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL ,
12.Nm SQLITE_DBSTATUS_CACHE_HIT ,
13.Nm SQLITE_DBSTATUS_CACHE_MISS ,
14.Nm SQLITE_DBSTATUS_CACHE_WRITE ,
15.Nm SQLITE_DBSTATUS_DEFERRED_FKS ,
16.Nm SQLITE_DBSTATUS_MAX
17.Nd Status Parameters for database connections
18.Sh SYNOPSIS
19.Fd #define SQLITE_DBSTATUS_LOOKASIDE_USED
20.Fd #define SQLITE_DBSTATUS_CACHE_USED
21.Fd #define SQLITE_DBSTATUS_SCHEMA_USED
22.Fd #define SQLITE_DBSTATUS_STMT_USED
23.Fd #define SQLITE_DBSTATUS_LOOKASIDE_HIT
24.Fd #define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
25.Fd #define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
26.Fd #define SQLITE_DBSTATUS_CACHE_HIT
27.Fd #define SQLITE_DBSTATUS_CACHE_MISS
28.Fd #define SQLITE_DBSTATUS_CACHE_WRITE
29.Fd #define SQLITE_DBSTATUS_DEFERRED_FKS
30.Fd #define SQLITE_DBSTATUS_MAX
31.Sh DESCRIPTION
32These constants are the available integer "verbs" that can be passed
33as the second argument to the sqlite3_db_status()
34interface.
35.Pp
36New verbs may be added in future releases of SQLite.
37Existing verbs might be discontinued.
38Applications should check the return code from sqlite3_db_status()
39to make sure that the call worked.
40The sqlite3_db_status() interface will return a
41non-zero error code if a discontinued or unsupported verb is invoked.
42.Bl -tag -width Ds
43.It SQLITE_DBSTATUS_LOOKASIDE_USED
44This parameter returns the number of lookaside memory slots currently
45checked out.
46.It SQLITE_DBSTATUS_LOOKASIDE_HIT
47This parameter returns the number malloc attempts that were satisfied
48using lookaside memory.
49Only the high-water value is meaningful; the current value is always
50zero.
51.It SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
52This parameter returns the number malloc attempts that might have been
53satisfied using lookaside memory but failed due to the amount of memory
54requested being larger than the lookaside slot size.
55Only the high-water value is meaningful; the current value is always
56zero.
57.It SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
58This parameter returns the number malloc attempts that might have been
59satisfied using lookaside memory but failed due to all lookaside memory
60already being in use.
61Only the high-water value is meaningful; the current value is always
62zero.
63.It SQLITE_DBSTATUS_CACHE_USED
64This parameter returns the approximate number of bytes of heap memory
65used by all pager caches associated with the database connection.
66The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always
670.
68.It SQLITE_DBSTATUS_SCHEMA_USED
69This parameter returns the approximate number of bytes of heap memory
70used to store the schema for all databases associated with the connection
71- main, temp, and any ATTACH-ed databases.
72The full amount of memory used by the schemas is reported, even if
73the schema memory is shared with other database connections due to
74shared cache mode being enabled.
75The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always
760.
77.It SQLITE_DBSTATUS_STMT_USED
78This parameter returns the approximate number of bytes of heap and
79lookaside memory used by all prepared statements associated with the
80database connection.
81The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always
820.
83.It SQLITE_DBSTATUS_CACHE_HIT
84This parameter returns the number of pager cache hits that have occurred.
85The highwater mark associated with SQLITE_DBSTATUS_CACHE_HIT is always
860.
87.It SQLITE_DBSTATUS_CACHE_MISS
88This parameter returns the number of pager cache misses that have occurred.
89The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS is always
900.
91.It SQLITE_DBSTATUS_CACHE_WRITE
92This parameter returns the number of dirty cache entries that have
93been written to disk.
94Specifically, the number of pages written to the wal file in wal mode
95databases, or the number of pages written to the database file in rollback
96mode databases.
97Any pages written as part of transaction rollback or database recovery
98operations are not included.
99If an IO or other error occurs while writing a page to disk, the effect
100on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.
101The highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always
1020.
103.It SQLITE_DBSTATUS_DEFERRED_FKS
104This parameter returns zero for the current value if and only if all
105foreign key constraints (deferred or immediate) have been resolved.
106The highwater mark is always 0.
107.El
108.Pp
109.Sh SEE ALSO
110.Xr sqlite3_db_status 3
111