From 7eac85c7434737adcec6378e31ee4d114e75eb76 Mon Sep 17 00:00:00 2001 From: Ryan Doherty Date: Wed, 24 Aug 2022 16:19:26 -0400 Subject: [PATCH] Vastly improve text search performance at cost of wildcards --- Model/lib/wdk/model/questions/queries/geneQueries.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/lib/wdk/model/questions/queries/geneQueries.xml b/Model/lib/wdk/model/questions/queries/geneQueries.xml index cba2c5dbf5..4d6c8bef22 100644 --- a/Model/lib/wdk/model/questions/queries/geneQueries.xml +++ b/Model/lib/wdk/model/questions/queries/geneQueries.xml @@ -1051,7 +1051,7 @@ and ps.na_feature_id in ($$phenotypeScoreFileterParam$$) ( SELECT ds.gene_source_id, gi.gene, ds.dataset_value_order FROM ApidbTuning.GeneId gi, ( $$ds_gene_ids$$ ) ds - WHERE LOWER(gi.id) LIKE REGEXP_REPLACE(REPLACE(LOWER(ds.gene_source_id), '*', '%'), '[[:space:]]', '') + WHERE LOWER(gi.id) = LOWER(ds.gene_source_id) ) t WHERE t.gene = ta.gene_source_id GROUP BY ta.gene_source_id, ta.source_id, ta.project_id