cell_size_check
Run extra sanity checks on b-tree pages as they are read from disk.
- По умолчанию
0 (off)- Range
- 0, 1
- Restart needed
- Нет
- Default checked on
- SQLite 3.5x
Что оно делает
Corruption is detected when the page is first read and is less likely to spread through the file, at a small CPU cost per page. Off by default because the extra checks run on every read.
Значение по умолчанию
0 (off). Off (a stock SQLite 3.5x build).
Check the current value
PRAGMA cell_size_check; SELECT * FROM pragma_cell_size_check; -- table-valued form, usable in queries
Change it
PRAGMA cell_size_check = ON; -- this connection only
No restart. It applies at once to the connection that runs it and is lost when that connection closes, so set it every time a connection opens.
When to change it
On databases where corruption has appeared before or the storage is not fully trusted, such as removable media, and while an integrity_check investigation is under way.
What can go wrong
The checks run on every page read for the connection's whole lifetime, so a read-heavy workload pays the CPU cost continuously; a caught bad page also turns silent reads of damaged rows into visible errors.
Questions about cell_size_check
What is the default value of cell_size_check in SQLite?
0 (off). Off (a stock SQLite 3.5x build).
Does changing cell_size_check require a restart?
No. No restart. It applies at once to the connection that runs it and is lost when that connection closes, so set it every time a connection opens.
When should I change cell_size_check?
On databases where corruption has appeared before or the storage is not fully trusted, such as removable media, and while an integrity_check investigation is under way.
Back to all SQLite settings, or check the SQLite manual for every option.
Check cell_size_check on your own server
SQLly runs the query above against SQLite and the other engines in this reference, from one desktop app on macOS, Windows and Linux.
Текст и данные на этой странице: CC BY 4.0, с указанием SQLly (sqlly.app). Код и фрагменты SQL: MIT. Подробнее о лицензии