From 27e1d7e9a098cc89ee51dc460350b37720b894e1 Mon Sep 17 00:00:00 2001 From: Daniel Thom Date: Thu, 9 Jan 2025 08:30:27 -0700 Subject: [PATCH] Add index for supplemental attribute searches --- src/supplemental_attribute_associations.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/supplemental_attribute_associations.jl b/src/supplemental_attribute_associations.jl index a5abd405..21fbf8c8 100644 --- a/src/supplemental_attribute_associations.jl +++ b/src/supplemental_attribute_associations.jl @@ -63,6 +63,17 @@ function _create_attribute_associations_table!( end function _create_indexes!(associations::SupplementalAttributeAssociations) + SQLite.createindex!( + associations.db, + SUPPLEMENTAL_ATTRIBUTE_TABLE_NAME, + "by_attribute", + [ + "attribute_uuid", + "component_uuid", + "component_type", + ]; + unique = false, + ) SQLite.createindex!( associations.db, SUPPLEMENTAL_ATTRIBUTE_TABLE_NAME,