Hi everyone,
While reviewing fhir_uuid lookups across FHIR synchronization and HIE workflows, I noticed that the fhir_uuid columns added in liquibase/2.3.x.x/uuid_columns.xml do not yet have indices on the highest-volume clinical tables:
clinlims.analysisclinlims.resultclinlims.sampleclinlims.sample_itemclinlims.patient
I’ve opened a GitHub issue to track adding standard B-tree indices via a new Liquibase changeset in 3.6.x.x/:
- GitHub Issue: db(perf): add B-tree indices on fhir_uuid for core clinical tables · Issue #5312 · DIGI-UW/OpenELIS-Global-2 · GitHub
Summary of Proposed Change
- Add a Liquibase XML changeset (
035-add-fhir-uuid-indexes.xml, registered in3.6.x.x/base.xml) creating non-unique B-tree indices onfhir_uuidfor those five tables. - Guard each with
<preConditions onFail="MARK_RAN">(<indexExists>) so existing or upgraded environments don’t fail. - Include explicit
<rollback>blocks (<dropIndex>) for every index, per Constitution Principle VI.
Questions for Maintainers
- Upgrade / Locking Considerations: For large production databases during upgrades, is standard Liquibase
<createIndex>(which runs inside the Liquibase transaction) preferred, or would you prefer PostgreSQLCREATE INDEX CONCURRENTLY(runInTransaction="false") to avoid write locks onanalysis/result/sample? - Scope & Naming: Are there any other high-volume
fhir_uuidtables (e.g.,organization,provideralready hasprovider_fhir_uuid_index) you’d like included or excluded from this pass? - Assignment: If this looks good, could I be assigned the issue so I can put up a PR targeting
develop?
Thanks!