From 63ec9e1a9c859d06732935d08e27fee07c2f1798 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Thu, 12 Dec 2024 12:11:35 -0500 Subject: [PATCH] perf: fix feature querying performance issue --- bento_reference_service/sql/schema.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bento_reference_service/sql/schema.sql b/bento_reference_service/sql/schema.sql index 8a2d2e6..58abaea 100644 --- a/bento_reference_service/sql/schema.sql +++ b/bento_reference_service/sql/schema.sql @@ -147,8 +147,10 @@ CREATE TABLE IF NOT EXISTS genome_feature_attributes ( attr_val INTEGER NOT NULL REFERENCES genome_feature_attribute_values ); CREATE INDEX IF NOT EXISTS genome_feature_attributes_feature_idx ON genome_feature_attributes (feature); +CREATE INDEX IF NOT EXISTS genome_feature_attributes_attr_key_only_idx ON genome_feature_attributes (attr_key); CREATE INDEX IF NOT EXISTS genome_feature_attributes_attr_key_idx ON genome_feature_attributes (feature, attr_key); +CREATE INDEX IF NOT EXISTS genome_feature_attributes_attr_val_only_idx ON genome_feature_attributes (attr_val); CREATE INDEX IF NOT EXISTS genome_feature_attributes_attr_val_idx ON genome_feature_attributes (feature, attr_val);