Re: [HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-28 Thread Fornaroli Christophe
On Fri, Dec 25, 2015 at 11:10 AM, Teodor Sigaev wrote: > Good catch, committed. > Thank you!

Re: [HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-25 Thread Teodor Sigaev
Good catch, committed. Fornaroli Christophe wrote: Hi, I think that we can improve the gin index scan performance for similarity search defined in the pg_trgm extension. The similarity function is (for the default case where DIVUNION is defined in the code): count / (len1 + len2 - cou

Re: [HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-24 Thread Alexander Korotkov
Hi, Christophe! On Thu, Dec 24, 2015 at 6:28 PM, Fornaroli Christophe wrote: > This code uses this upper bound for the similarity: ntrue / (nkeys - > ntrue). But if there is ntrue trigrams in common, we know that the indexed > string is at least ntrue trigrams long. We can then use a more aggres

[HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-24 Thread Fornaroli Christophe
Hi, I think that we can improve the gin index scan performance for similarity search defined in the pg_trgm extension. The similarity function is (for the default case where DIVUNION is defined in the code): count / (len1 + len2 - count) >= trgm_limit where len1 is the number of unique