From 66d3ef6d391f03f9eb977f8278d07528d68c33ca Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 31 Mar 2011 14:10:26 +0000 Subject: Use namedpackages function and GIN index to speed up bug association --- gentoobrowse/console/bugassociate.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentoobrowse/console/bugassociate.xml b/gentoobrowse/console/bugassociate.xml index d18a98f..d8decc5 100644 --- a/gentoobrowse/console/bugassociate.xml +++ b/gentoobrowse/console/bugassociate.xml @@ -6,7 +6,7 @@ SELECT b.bugid, p.packageid FROM bugs b, packages p, categories c WHERE p.categoryid = c.categoryid - AND TO_TSVECTOR('english', REGEXP_REPLACE(b.summary, '-[0-9][^ ]*', '', 'g')) @@ PLAINTO_TSQUERY('english', c.name || '/' || p.name) + AND namedpackages(b.summary) @> ARRAY[c.name || '/' || p.name] bugid -- cgit v1.2.3