Azure Database for PostgreSQL stores large binary attachments beside searchable municipal text used for RAG. How should indexing treat those binaries?
Select an answer to reveal the explanation.
Short Explanation
Don’t index the photo album if you only search the captions—keep big attachment columns out of indexes so PostgreSQL isn’t babysitting blob bytes the RAG path never filters on.
Full Explanation
When Azure Database for PostgreSQL stores large binary attachments beside searchable municipal text used for RAG, indexes should exclude large binary attachment columns that are not used in predicates so index maintenance does not inflate overhead for non-query blob fields. Indexing every binary attachment column even when queries never filter on the blob bytes wastes storage and CPU on civic schemas that already carry heavy PDF and image payloads. Requiring full-table binary scans as the only access path for text RAG metadata forces expensive access patterns for work that should use text and metadata indexes. Storing binaries as primary keys to force unique indexes on attachment payloads makes enormous values the identity of the row and is an anti-pattern for both indexing and key design in municipal databases. Exam caveat: exclude unused blob columns from indexes; still index the text and metadata columns RAG actually filters and joins on for department-scoped retrieval. Operationally, review pg_stat and index definitions after ordinance ingest, drop indexes on unused attachment columns, keep indexes on chunk text keys and department filters, and re-measure ingest and vacuum cost after the change.