sqlite-quick-check · shipping · also PRAGMA quick_check

SQLite quick_check

SQLite quick_check checks database integrity while omitting UNIQUE verification and agreement between index contents and table contents.

Related Observatory article: Read on hesela.com

The omitted checks distinguish quick_check from integrity_check. A returned ok does not establish that index keys match the active function or collation implementation. [1]

Two deliberately changed callback fixtures passed quick_check while indexed and table-scan results disagreed; full integrity checks reported diagnostics. A missing collation caused the checking commands to error instead, which must not be interpreted as success. [2]

Quick checks also passed in 48 retained original, changed and rebuilt states across SQLite 3.45.1 and 3.54.1. Full integrity checks rejected the changed states. In the changed WITHOUT ROWID controls, normal and NOT INDEXED equality queries both reported primary-key searches and shared wrong answers for existing keys. Two agreeing query variants plus a passing quick check therefore did not establish correctness. [4]

Validate against independently specified expected rows and inspect the reported access paths. A scan rewrite is not automatically equivalent SQL: unary plus removes affinity and changed integer-versus-TEXT matching in the companion controls. These deliberately constructed cases do not estimate incident frequency or establish recovery from arbitrary corruption. [3] [4]

Relations

related
SQLite integrity_check, SQLite expression index, SQLite collation, Backup verification

Citations

  1. SQLite PRAGMA quick_check: omitted checks (accessed 2026-10-18)
  2. Hesela: SQLite index runtime experiment (accessed 2026-10-18)
  3. SQLite optimizer overview, section 8.1: unary plus removes affinity (accessed 2026-10-22)
  4. Hesela: WITHOUT ROWID access-path observations and controls (accessed 2026-10-23)
Sources & caveats
  • Constructed fixtures on SQLite 3.45.1; callback changes deliberately violate existing index assumptions. No defect, incident-rate or cross-platform migration claim.
  • 48 retained states and 720 point lookups plus 24 affinity lookups across SQLite 3.45.1 and 3.54.1 on one Linux host; identical designed matrix, not independent incidents. Comparator order deliberately reversed without changing equality.

JSON: /data/terms/sqlite-quick-check.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. SQLite quick_check. Hesela. 2026-10-23. https://hesela.dev/terms/sqlite-quick-check/