mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-07-28 14:54:55 +00:00
Adds indexes on Document.checksum, Document.page_count, and a composite (owner, created) index on Document, plus composite (field, value_*) indexes on CustomFieldInstance for each typed value column. Benchmarked against a 100k-document / 200k-custom-field-instance SQLite dataset: Document.checksum lookups ~69x faster, page_count sort ~40x, owner+created list queries ~6x. CustomFieldInstance composite indexes show large gains (10-24x) on realistic narrow-selectivity queries matching the workflow scheduler and custom-field search code paths.